Bug 1756224: Update references to perfdocs linter to explicitly set path r=sparky

Ideally, the `perfdocs` linter suggestion to `--fix` issues would take
into account the `paths` that were provided, rather than printing the
sure-fire "lint and fix all" solution.

Actually, on further consideration, theoretically such a recommendation
should appear at the `./mach lint` level, and not be linter-specific. Oh
well, that's a future improvement :)

-----

This patch updates the `perfdocs` documentation and suggestions to
successfully operate in the same manner that they did before
bug 1753701.

Differential Revision: https://phabricator.services.mozilla.com/D139159
This commit is contained in:
Mitchell Hentges 2022-03-09 15:52:49 +00:00
Родитель 2da98775fb
Коммит 1d06e45585
4 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -12,7 +12,7 @@ The mozlint integration of PerfDocs can be run using mach:
.. parsed-literal::
$ mach lint --linter perfdocs
$ mach lint --linter perfdocs .
Configuration

Просмотреть файл

@ -249,6 +249,6 @@ class Generator(object):
# should be regenerated by comparing the directories.
if not are_dirs_equal(perfdocs_tmpdir, self.perfdocs_path):
logger.warning(
"PerfDocs are outdated, run ./mach lint -l perfdocs --fix` to update them.",
"PerfDocs are outdated, run ./mach lint -l perfdocs --fix .` to update them.",
files=get_possibly_changed_files(),
)

Просмотреть файл

@ -27,8 +27,8 @@ def run_perfdocs(config, logger=None, paths=None, generate=True):
test section. H5 will be used be used for individual tests within each
suite.
Usage for verification: ./mach lint -l perfdocs
Usage for generation: ./mach lint -l perfdocs --fix
Usage for verification: "./mach lint -l perfdocs ."
Usage for generation: "./mach lint -l perfdocs --fix ."
For validation, see the Verifier class for a description of how
it works.

Просмотреть файл

@ -118,7 +118,7 @@ def test_perfdocs_generator_needed_update(logger, structured_logger, perfdocs_sa
generator.generate_perfdocs()
expected = (
"PerfDocs are outdated, run ./mach lint -l perfdocs --fix` to update them."
"PerfDocs are outdated, run ./mach lint -l perfdocs --fix .` to update them."
)
args, _ = logger.warning.call_args