Closed Bug 1263056 Opened 4 years ago Closed 4 years ago

[checkstyle] Add WhitespaceAfter check

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 48
Tracking Status
firefox48 --- fixed

People

(Reporter: mcomella, Assigned: mcomella)

References

(Blocks 2 open bugs)

Details

Attachments

(3 files)

No description provided.
Comment on attachment 8739281 [details]
MozReview Request: Bug 1263056 - Add WhitespaceAfter for semi-colons & fix warnings. r=sebastian

https://reviewboard.mozilla.org/r/45167/#review41683

This is cool!

Offtopic: Do you have experience adding this (and lint) as a hg hook? I tried to add lint as a hook that is executed before pushing to fx-team but this didn't really work (Actually it worked great but the hook was executed for much more "events" than just push).
Attachment #8739281 - Flags: review?(s.kaspari) → review+
Attachment #8739282 - Flags: review?(s.kaspari) → review+
Comment on attachment 8739282 [details]
MozReview Request: Bug 1263056 - Add WhitespaceAfter comma & fix issues. r=sebastian

https://reviewboard.mozilla.org/r/45169/#review41687
Comment on attachment 8739283 [details]
MozReview Request: Bug 1263056 - Add TODO for CAST check in WhitespaceAfter. r=sebastian

https://reviewboard.mozilla.org/r/45171/#review41689

::: mobile/android/app/checkstyle.xml:48
(Diff revision 1)
>          <module name="NoLineWrap">
>              <property name="tokens" value="IMPORT,PACKAGE_DEF"/>
>          </module>
>          <module name="OuterTypeFilename"/> <!-- `class Lol` only in Lol.java -->
>          <module name="WhitespaceAfter">
> +            <!-- TODO: (bug 1263059) Remove specific tokens to enable CAST check. -->

We should add a rule that checks for TODO comments j/k :)
Attachment #8739283 - Flags: review?(s.kaspari) → review+
(In reply to Sebastian Kaspari (:sebastian) from comment #4)
> Offtopic: Do you have experience adding this (and lint) as a hg hook? I
> tried to add lint as a hook that is executed before pushing to fx-team but
> this didn't really work (Actually it worked great but the hook was executed
> for much more "events" than just push).

I do not. I would like to do this though because treeherder has too much turn around time (filed bug 1263201).

(In reply to Sebastian Kaspari (:sebastian) from comment #6)
> We should add a rule that checks for TODO comments j/k :)

:P Almost as good as Android Lint's `// STOPSHIP`
https://hg.mozilla.org/mozilla-central/rev/a1623848c0a0
https://hg.mozilla.org/mozilla-central/rev/a52b42fca518
https://hg.mozilla.org/mozilla-central/rev/e450201364f2
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
You need to log in before you can comment on or make changes to this bug.