Bug 1740598 - When linting, process only the given revision when --rev is present r=ahal

Differential Revision: https://phabricator.services.mozilla.com/D174539
This commit is contained in:
Steve Fink 2023-04-04 18:25:13 +00:00
parent 982d8e5dbc
commit 177cdbd4d9

View File

@ -366,7 +366,11 @@ def run(
return 1
paths = lint.linters[0]["local_exclude"]
if not paths and Path.cwd() == Path(lint.root) and not (outgoing or workdir):
if (
not paths
and Path.cwd() == Path(lint.root)
and not (outgoing or workdir or rev)
):
print(
"warning: linting the entire repo takes a long time, using --outgoing and "
"--workdir instead. If you want to lint the entire repo, run `./mach lint .`"