Closed Bug 1572590 Opened 6 months ago Closed 5 months ago

Indent conditionally-defined prefs

Categories

(Core :: Preferences: Backend, task)

task
Not set

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: njn, Assigned: njn)

References

Details

Attachments

(6 files)

Pref files (all.js, StaticPrefList.yaml, etc.) use the preprocessor to conditionally define some prefs. No indentation is used within these blocks. For large conditional blocks it's very easy to not realize it's conditional. See bug 1561929 comment 1 for an example bug caused by this problem.

Introducing indentation will make things clearer.

The patch also indents some comments within conditional blocks, which improves
readability.

The patch also removes several comments from the top of the file, every single
one of which is incorrect.

Depends on D41304

It turns out that preprocessor.py can't handle indentation of preprocessor directives, which this bug requires. So I filed bug 1573080 to deal with that first.

Pushed by nnethercote@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1bba9cf0078b
Indent conditionally-defined prefs in StaticPrefList.yaml. r=KrisWright
https://hg.mozilla.org/integration/autoland/rev/8dc530a45e3f
Indent conditionally-defined prefs in all.js. r=KrisWright
https://hg.mozilla.org/integration/autoland/rev/fedd2e1da156
Indent conditionally-defined prefs in firefox.js. r=KrisWright
https://hg.mozilla.org/integration/autoland/rev/5f0649891808
Indent conditionally-defined prefs in mobile.js. r=KrisWright
https://hg.mozilla.org/integration/autoland/rev/2b5c252ee874
Indent conditionally-defined prefs in geckoview-prefs.js. r=KrisWright
https://hg.mozilla.org/integration/autoland/rev/ebe2ebcca7b3
Indent conditionally-defined prefs in firefox-branding.js. r=KrisWright
Pushed by nnethercote@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cf99b26c5b1f
Indent conditionally-defined prefs in StaticPrefList.yaml. r=KrisWright
Pushed by nnethercote@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7e5760b1988c
Indent conditionally-defined prefs in all.js. r=KrisWright
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Pushed by nnethercote@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d12c8cc8576c
Indent conditionally-defined prefs in firefox.js. r=KrisWright
https://hg.mozilla.org/integration/autoland/rev/97e67523f4e5
Indent conditionally-defined prefs in mobile.js. r=KrisWright
https://hg.mozilla.org/integration/autoland/rev/5d3bb8c3c3dc
Indent conditionally-defined prefs in geckoview-prefs.js. r=KrisWright
https://hg.mozilla.org/integration/autoland/rev/fcd0d5ef39e1
Indent conditionally-defined prefs in firefox-branding.js. r=KrisWright
You need to log in before you can comment on or make changes to this bug.