Open Bug 1395694 Opened 7 years ago Updated 2 years ago

Use moz.build files metadata to generate include and exclude lists

Categories

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

enhancement

Tracking

(Not tracked)

People

(Reporter: ahal, Unassigned)

References

Details

Currently we store centralized lists of paths for 'include' and 'exclude' in the .yml lint definitions. This isn't ideal because it's:
a) not obvious where it lives
b) makes moving files more complicated

Instead we could make use of moz.build's files metadata feature to define this. It could look something like:

with Files('**'):
    LINT.include = ['flake8', 'py3']
    LINT.exclude = ['yaml', 'eslint']

I'd prefer if the code that processes this lives outside of mozlint's core, but maybe tools/lint/mach_commands.py could calculate and pass this information along to mozlint.
+1 from me.

For whoever takes this, https://hg.mozilla.org/integration/autoland/rev/33e1e1b4acd5 is a recent example of something very similar in functionality. The main thing I would do better is have a better place to store the sets of allowed values.
See Also: → 1366714
Priority: -- → P3
Product: Testing → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.