Open Bug 1895746 Opened 10 months ago Updated 9 months ago

globs not working in lint exclusions like Generated.txt

Categories

(Developer Infrastructure :: Lint and Formatting, defect)

defect

Tracking

(Not tracked)

People

(Reporter: gbrown, Unassigned)

References

Details

In bug 1881094, I am moving some lint exclusions to Generated.txt. For example:
https://phabricator.services.mozilla.com/D209818

mobile/android/android-components/components/browser/engine-system/src/main/res/
mobile/android/android-components/components/browser/errorpages/src/main/res/
mobile/android/android-components/components/browser/menu/src/main/res/
...

The list of component paths may change over time, so I would prefer to make this:

mobile/android/android-components/**/src/main/res/

but that doesn't work: (license) linting is then enabled for those paths.

I also tried some variations like

mobile/android/android-components/**/src/main/res/**

but couldn't get this to work.

See Also: → 1881094

It looks like for some things like eslint & stylelint this should already work, however I think the main lint harness is working by directory only.

Andrew, would there be an easy way to fix this?

We might also need to check the clang plugin as that's using the file as well.

Flags: needinfo?(ahal)

I'm not really sure what the build system or other things like the clang plugin do with that file, but I don't think mach lint would use the linked logic there. Those files are read here:
https://searchfox.org/mozilla-central/source/tools/lint/mach_commands.py#45

Afaict, the globs are supposed to work, as it looks like we just stuff each line in the file into the exclude key (which supports globs). Seems like there's a subtle bug somewhere. Sorry I can't say off-hand how easy this would be to fix. Requires more investigation.

Flags: needinfo?(ahal)

The severity field is not set for this bug.
:andi, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(bpostelnicu)
Severity: -- → S3
Flags: needinfo?(bpostelnicu)
You need to log in before you can comment on or make changes to this bug.