mozlint package
Subpackages
Submodules
mozlint.cli module
- class mozlint.cli.MozlintParser(**kwargs)
Bases:
ArgumentParser- arguments = [[['paths'], {'default': None, 'help': "Paths to file or directories to lint, like 'browser/components/loop' or 'mobile/android'. If not provided, defaults to the files changed according to --outgoing and --workdir.", 'nargs': '*'}], [['-l', '--linter'], {'action': 'append', 'default': [], 'dest': 'linters', 'help': "Linters to run, e.g 'eslint'. By default all linters are run for all the appropriate files."}], [['--list'], {'action': 'store_true', 'default': False, 'dest': 'list_linters', 'help': 'List all available linters and exit.'}], [['-W', '--warnings'], {'choices': ['soft'], 'const': True, 'dest': 'show_warnings', 'help': 'Display and fail on warnings in addition to errors. --warnings=soft can be used to report warnings but only fail on errors.', 'nargs': '?'}], [['-v', '--verbose'], {'action': 'store_true', 'default': False, 'dest': 'show_verbose', 'help': 'Enable verbose logging.'}], [['-f', '--format'], {'action': 'append', 'dest': 'formats', 'help': "Formatter to use. Defaults to 'stylish' on stdout. You can specify an optional path as --format formatter:path that will be used instead of stdout. You can also use multiple formatters at the same time. Formatters available: compact, json, stylish, summary, treeherder, unix."}], [['-n', '--no-filter'], {'action': 'store_false', 'default': True, 'dest': 'use_filters', 'help': "Ignore all filtering. This is useful for quickly testing a directory that otherwise wouldn't be run, without needing to modify the config file."}], [['--include-third-party'], {'action': 'store_true', 'default': False, 'dest': 'include_third_party', 'help': 'Also run the linter(s) on third-party code'}], [['-o', '--outgoing'], {'const': True, 'help': 'Lint files touched by commits that are not on the remote repository. Without arguments, finds the default remote that would be pushed to. The remote branch can also be specified manually. Works with mercurial or git.', 'nargs': '?'}], [['-w', '--workdir'], {'choices': ['staged', 'all'], 'const': 'all', 'help': "Lint files touched by changes in the working directory (i.e haven't been committed yet). On git, --workdir=staged can be used to only consider staged files. Works with mercurial or git.", 'nargs': '?'}], [['-r', '--rev'], {'default': None, 'help': 'Lint files touched by