示例#1
0
 def check_source(self):
     '''
     Check files in the source tree according to source_check_rules.
     See filechecker.py for possible rules to apply.
     '''
     if self.source_check_rules == []:
         print 'No rules defined.'
         return
     if not filechecker.apply_rules(self.source_check_rules):
         self.fail('Source tree failed automated checks. Use --steps="default,-check_source" to suppress these checks temporarily.')
示例#2
0
 def check_source(self):
     '''
     Check files in the source tree according to source_check_rules.
     See filechecker.py for possible rules to apply.
     '''
     if self.source_check_rules == []:
         print 'No rules defined.'
         return
     if not filechecker.apply_rules(self.source_check_rules):
         self.fail('Source tree failed automated checks. Use --steps="default,-check_source" to suppress these checks temporarily.')
示例#3
0
def main():
    options, args = parse_args()
    rule_names = list(args)
    negated_rule_names = ["-" + r for r in rule_names]
    rules = []
    for action, pattern in options.patterns:
        if action == "include":
            rules.append([pattern, rule_names])
        elif action == "exclude":
            rules.append([pattern, negated_rule_names])
    result = filechecker.apply_rules(rules)
    if not result:
        sys.exit(1)
示例#4
0
def main():
    options, args = parse_args()
    rule_names = list(args)
    negated_rule_names = ["-" + r for r in rule_names]
    rules = []
    for action, pattern in options.patterns:
        if action == "include":
            rules.append([pattern, rule_names])
        elif action == "exclude":
            rules.append([pattern, negated_rule_names])
    result = filechecker.apply_rules(rules)
    if not result:
        sys.exit(1)