git-linter/git_lint/options.py

44 lines
1.7 KiB
Python
Raw Normal View History

2016-09-28 21:26:06 +00:00
import gettext
_ = gettext.gettext
2016-09-28 21:26:06 +00:00
OPTIONS = [
('o', 'only', True,
_('A comma-separated list of only those linters to run'), ['exclude']),
('x', 'exclude', True,
_('A comma-separated list of linters to skip'), []),
('l', 'linters', False,
_('Show the list of configured linters'), []),
('b', 'base', False,
_('Check all changed files in the repository, not just those in the current directory.'), []),
('a', 'all', False,
_('Scan all files in the repository, not just those that have changed.'), ['revision']),
('r', 'revision', True,
_('Scan all files changed between revisions'), []),
(None, 'pr', False,
_('Scan all files changed between head and previous check-in'), ['revision']),
('e', 'every', False,
_('Short for -b -a: scan everything'), []),
('w', 'workspace', False,
_('Scan the workspace'), ['staging']),
('s', 'staging', False,
_('Scan the staging area (useful for pre-commit).'), []),
# ('g', 'changes', False,
# _("Report lint failures only for diff'd sections"), ['complete']),
# ('p', 'complete', False,
# _('Report lint failures for all files'), []),
('t', 'bylinter', False,
_('Group the reports by linter first as they appear in the config file [default]'), []),
('f', 'byfile', False,
_('Group the reports by file first'), []),
('d', 'dryrun', False,
_('Dry run - report what would be done, but do not run linters'), []),
('c', 'config', True,
_('Path to config file'), []),
('h', 'help', False,
_('This help message'), []),
('V', 'verbose', False,
_('A slightly more verbose output'), []),
('v', 'version', False,
_('Version information'), [])
]