зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
2da98775fb
Коммит
1d06e45585
|
@ -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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче