releases-comm-central/tools/lint/commlint
Rob Lemley c4d4998fc8 Bug 1692289 - Port bug 1416149: Add support for fluent-lint exclusions to commlint wrapper. r=justdave
commlint:lint_wrapper is a hack to get mozlint to apply exclude lists that are
appropriate for Thunderbird to the various lint checks run in CI.
The fluent-lint check allows for more targetted exclusions than mozlint itself
supports, reading exlcusions.yml from tools/lint/fluent-lint.
In order to find the Thunderbird version of that file, lintargs["root"] needs
to be monkeypatched right before calling fluent-lint's lint function.

To test, first run "mach lint -l fluent-lint comm/**/*.ftl". That will use the
Firefox configurations in tools/lint. Then run
"mach lint -l fluent-lint --config-path=comm/tools/lint comm/**/*.ftl" which
uses the configurations in comm/tools/lint. There should be a drop in the number
of reported problems.

exclusions.yml as included in this patch is incomplete, but is sufficient to
test that it works and for identifying actual problems in the .ftl files so they
can be addressed.

Differential Revision: https://phabricator.services.mozilla.com/D113189

--HG--
extra : moz-landing-system : lando
2021-05-03 17:00:23 +00:00
..
__init__.py Bug 1692289 - Port bug 1416149: Add support for fluent-lint exclusions to commlint wrapper. r=justdave 2021-05-03 17:00:23 +00:00