예제 #1
0
 def on_pr_opened(self, api, payload):
     diff = api.get_diff()
     for line in diff.split('\n'):
         if is_addition(line) and line.find("<title></title>") > -1:
             # This test doesn't consider case and whitespace the same way
             # that a HTML parser does, so empty title elements might still
             # go unnoticed. It will catch the low-hanging fruit, though.
             self.warn(WARNING)
             return
예제 #2
0
파일: newpr.py 프로젝트: flacerdk/highfive
 def get_added_lines(self):
     diff = self.get_diff()
     for line in diff.splitlines():
         if is_addition(line):
             # prefix of one or two pluses (+)
             yield line
예제 #3
0
 def on_pr_opened(self, api, payload):
     diff = api.get_diff()
     for line in diff.split('\n'):
         if is_addition(line) and line.find('unsafe ') > -1:
             self.warn(unsafe_warning_msg)
             return
예제 #4
0
 def on_pr_opened(self, api, payload):
     diff = api.get_diff()
     for line in diff.split('\n'):
         if is_addition(line) and line.find('unsafe ') > -1:
             self.warn(unsafe_warning_msg)
             return