Closed Bug 1623339 Opened 6 years ago Closed 6 years ago

[flake8] Explicitly linting a subdirectory of an excluded directory doesn't exclude files

Categories

(Developer Infrastructure :: Lint and Formatting, defect, P3)

defect

Tracking

(firefox76 fixed)

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: ahal, Assigned: ahal)

Details

Attachments

(3 files)

E.g, the path dom/canvas is excluded in the root .flake8 file:
https://searchfox.org/mozilla-central/source/.flake8#10

But running:

$ ./mach lint -l flake8 dom                # no errors
$ ./mach lint -l flake8 dom/canvas         # no errors
$ ./mach lint -l flake8 dom/canvas/test    # errors

The last invocation should also not show any errors. This case would normally be handled by mozlint, but flake8 uses the .flake8 file rather than the mozlint exclude rules, so it does its own filtering.

Assignee: nobody → ahal
Status: NEW → ASSIGNED
Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1dab0bfbded8 [lint] Honour --no-filter in the flake8 linter, r=linter-reviewers,sylvestre https://hg.mozilla.org/integration/autoland/rev/9b7035c8ed1a [mozlint] Add a test for pathutils.expand_exclusions, r=linter-reviewers,sylvestre https://hg.mozilla.org/integration/autoland/rev/ad00ba004bc0 [lint.flake8] Fix path filtering bug when specifying subdirectory of excluded path, r=linter-reviewers,sylvestre
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: