diff options
Diffstat (limited to '')
-rw-r--r-- | comm/tools/lint/mach_commands.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/comm/tools/lint/mach_commands.py b/comm/tools/lint/mach_commands.py new file mode 100644 index 0000000000..da503b2016 --- /dev/null +++ b/comm/tools/lint/mach_commands.py @@ -0,0 +1,24 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +from mach.decorators import Command + + +def setup_argument_parser(): + from mozlint import cli + + return cli.MozlintParser() + + +@Command( + "commlint", + category="thunderbird", + description="Run linters with Thunderbird configurations.", + parser=setup_argument_parser, +) +def commlint(command_context, paths, extra_args=[], **kwargs): + kwargs["config_paths"].insert(0, "comm/tools/lint") + return command_context._mach_context.commands.dispatch( + "lint", command_context._mach_context, paths=paths, argv=extra_args, **kwargs + ) |