Open Bug 1477364 Opened 8 years ago Updated 3 years ago

Add a linter to check for StaticPref overrides defined in JS pref files

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: kmag, Unassigned)

References

Details

When prefs are moved to StaticPrefList.h, we should make all in-tree changes to their default values there. Out-of-tree products can still override values in pref files, but there's a cost to those overrides, and we shouldn't pay it for in-tree changes. But old habits die hard, and apparently some override values for static prefs have already been defined in all.js under #ifdefs for feature flags. That's a pretty easy mistake to make, even if you know better, so we should try to prevent it with static analysis.
I'm wondering if rather than a linter, if this might be possible in a unit test of some kind? Specifically, I'm thinking that due to preprocessing the various files & detecting which ones are preference files, if this would just be easier to do post-build in a test.
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.