summaryrefslogtreecommitdiffstats
path: root/comm/tools/lint/mach_commands.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /comm/tools/lint/mach_commands.py
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'comm/tools/lint/mach_commands.py')
-rw-r--r--comm/tools/lint/mach_commands.py24
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
+ )