Closed Bug 1412346 Opened 2 years ago Closed 2 years ago

Clean up license blocks & mode lines in /layout

Categories

(Core :: Layout, defect, P5, trivial)

defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(5 files)

mccr8 has a script[1] that can do some automated fixup of modelines in C++ files -- adding our standard modeline (with 2-space indent) for files that it detects as being Mozilla code (with MPL) and that it detects as being correctly 2-space indented.  (It's smart enough to know it should avoid adding a 2-space-indentation modeline to 4-space-indented files.)

I'm filing this bug on running that tool over /layout.  The patch-stack here will start out with fixes for a few anomalous things that cause the script to throw up its hands (e.g. missing or wrong license block), and then finally I'll post the automated patch itself.

[1] https://github.com/amccreight/moz-source-tools/blob/master/modeline.py
Assignee: nobody → dholbert
Summary: Clean up license blocks & modelines in /layout → Clean up license blocks & mode lines in /layout
Comment on attachment 8922898 [details]
Bug 1412346 part 1: Add standard mode line & MPL boilerplate to a few layout C++ files that are missing it entirely.

https://reviewboard.mozilla.org/r/194040/#review199114
Attachment #8922898 - Flags: review?(jfkthame) → review+
Comment on attachment 8922899 [details]
Bug 1412346 part 2: Split mode line into its own C++ comment & own line, in a few files within layout.

https://reviewboard.mozilla.org/r/194042/#review199116
Attachment #8922899 - Flags: review?(jfkthame) → review+
Comment on attachment 8922900 [details]
Bug 1412346 part 3: Move a misplaced "IWYU pragma" comment down a few lines to match our convention and so mode line can be first.

https://reviewboard.mozilla.org/r/194044/#review199118
Attachment #8922900 - Flags: review?(jfkthame) → review+
Comment on attachment 8922901 [details]
Bug 1412346 part 4: Update stale MPL license boilerplate on a few files in layout.

https://reviewboard.mozilla.org/r/194046/#review199120
Attachment #8922901 - Flags: review?(jfkthame) → review+
Comment on attachment 8922902 [details]
Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines.

https://reviewboard.mozilla.org/r/194048/#review199122

I'm sure you'll be pleased to know that I carefully checked every one of these files.... ;)
Attachment #8922902 - Flags: review?(jfkthame) → review+
Thanks for the review! :D

I triggered a linux-builds-only Try run, to be sure I didn't screw something up with a comment-tweak, and I'm rebuilding locally as well. I'll go ahead and trigger autoland as soon as one or the other of those builds finishes.
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2a807f9ddba9
part 1: Add standard mode line & MPL boilerplate to a few layout C++ files that are missing it entirely. r=jfkthame
https://hg.mozilla.org/integration/autoland/rev/b2388646f983
part 2: Split mode line into its own C++ comment & own line, in a few files within layout. r=jfkthame
https://hg.mozilla.org/integration/autoland/rev/423370b7b006
part 3: Move a misplaced "IWYU pragma" comment down a few lines to match our convention and so mode line can be first. r=jfkthame
https://hg.mozilla.org/integration/autoland/rev/d5056038d25e
part 4: Update stale MPL license boilerplate on a few files in layout. r=jfkthame
https://hg.mozilla.org/integration/autoland/rev/905239391e05
part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
See Also: → 1412427
You need to log in before you can comment on or make changes to this bug.