Esempio n. 1
0
 def __init__(self):
     # Use an ordered dict so that the order in which rules are applied is always the same
     self._rules = OrderedDict([(rule_cls.id, rule_cls())
                                for rule_cls in self.default_rule_classes])
     self._verbosity = options.IntOption('verbosity', 3, "Verbosity")
     self._ignore_merge_commits = options.BoolOption(
         'ignore-merge-commits', True, "Ignore merge commits")
     self._ignore_fixup_commits = options.BoolOption(
         'ignore-fixup-commits', True, "Ignore fixup commits")
     self._ignore_squash_commits = options.BoolOption(
         'ignore-squash-commits', True, "Ignore squash commits")
     self._debug = options.BoolOption('debug', False, "Enable debug mode")
     self._extra_path = None
     target_description = "Path of the target git repository (default=current working directory)"
     self._target = options.PathOption('target',
                                       os.path.realpath(os.getcwd()),
                                       target_description)
     self._ignore = options.ListOption('ignore', [],
                                       'List of rule-ids to ignore')
     self._contrib = options.ListOption('contrib', [],
                                        'List of contrib-rules to enable')
     self._config_path = None
     ignore_stdin_description = "Ignore any stdin data. Useful for running in CI server."
     self._ignore_stdin = options.BoolOption('ignore-stdin', False,
                                             ignore_stdin_description)
Esempio n. 2
0
 def __init__(self):
     # Use an ordered dict so that the order in which rules are applied is always the same
     self._rules = OrderedDict([(rule_cls.id, rule_cls()) for rule_cls in self.default_rule_classes])
     self._verbosity = options.IntOption('verbosity', 3, "Verbosity")
     self._ignore_merge_commits = options.BoolOption('ignore-merge-commits', True, "Ignore merge commits")
     self._debug = options.BoolOption('debug', False, "Enable debug mode")
     self._extra_path = None
     target_description = "Path of the target git repository (default=current working directory)"
     self._target = options.PathOption('target', os.path.abspath(os.getcwd()), target_description)
     self._ignore = options.ListOption('ignore', [], 'List of rule-ids to ignore')
     self._config_path = None
Esempio n. 3
0
 def __init__(self, config_path=None, target=None):
     # Use an ordered dict so that the order in which rules are applied is always the same
     self._rules = OrderedDict([(rule_cls.id, rule_cls()) for rule_cls in self.default_rule_classes])
     self._verbosity = options.IntOption('verbosity', 3, "Verbosity")
     self._ignore_merge_commits = options.BoolOption('ignore-merge-commits', True, "Ignore merge commits")
     self._debug = options.BoolOption('debug', False, "Enable debug mode")
     self.config_path = config_path
     if target:
         self.target = target
     else:
         self.target = os.path.abspath(os.getcwd())
Esempio n. 4
0
 def __init__(self):
     self.rules = RuleCollection(self.default_rule_classes)
     self._verbosity = options.IntOption('verbosity', 3, "Verbosity")
     self._ignore_merge_commits = options.BoolOption(
         'ignore-merge-commits', True, "Ignore merge commits")
     self._ignore_fixup_commits = options.BoolOption(
         'ignore-fixup-commits', True, "Ignore fixup commits")
     self._ignore_squash_commits = options.BoolOption(
         'ignore-squash-commits', True, "Ignore squash commits")
     self._ignore_revert_commits = options.BoolOption(
         'ignore-revert-commits', True, "Ignore revert commits")
     self._debug = options.BoolOption('debug', False, "Enable debug mode")
     self._extra_path = None
     target_description = "Path of the target git repository (default=current working directory)"
     self._target = options.PathOption('target',
                                       os.path.realpath(os.getcwd()),
                                       target_description)
     self._ignore = options.ListOption('ignore', [],
                                       'List of rule-ids to ignore')
     self._contrib = options.ListOption('contrib', [],
                                        'List of contrib-rules to enable')
     self._config_path = None
     ignore_stdin_description = "Ignore any stdin data. Useful for running in CI server."
     self._ignore_stdin = options.BoolOption('ignore-stdin', False,
                                             ignore_stdin_description)
     self._staged = options.BoolOption(
         'staged', False,
         "Read staged commit meta-info from the local repository.")