Exemple #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.')
Exemple #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.')
Exemple #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)
Exemple #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)