Closed Bug 1258794 Opened 8 years ago Closed 8 years ago

Add checkstyle check for excess whitespace

Categories

(Firefox Build System :: Android Studio and Gradle Integration, defect)

All
Android
defect
Not set
normal

Tracking

(firefox48 fixed)

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: mcomella, Assigned: mcomella)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

I don't see a specific check for it in this list of whitespace:
  http://checkstyle.sourceforge.net/config_whitespace.html

[1] indicates we may have to use RegexSingleLine*:
  http://checkstyle.sourceforge.net/config_regexp.html

This is the other most common style issue I see in reviews (along with bug 1258789).

[1]: https://stackoverflow.com/questions/15950671/eclipse-checkstyle-disable-lline-has-trailing-spaces
Assignee: nobody → michael.l.comella
Comment on attachment 8738631 [details]
MozReview Request: Bug 1258794 - Add excess whitespace checkstyle check & fix issues. r=nalexander

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/44629/diff/1-2/
Comment on attachment 8738630 [details]
MozReview Request: Bug 1258794 - Pre: Add GenericWhitespace and fix single issue. r=nalexander

https://reviewboard.mozilla.org/r/44627/#review41331

wfm.
Attachment #8738630 - Flags: review?(nalexander) → review+
Attachment #8738631 - Flags: review?(nalexander) → review+
Comment on attachment 8738631 [details]
MozReview Request: Bug 1258794 - Add excess whitespace checkstyle check & fix issues. r=nalexander

https://reviewboard.mozilla.org/r/44629/#review41333

Stamp!

::: mobile/android/app/checkstyle.xml:43
(Diff revision 2)
>      <module name="FileTabCharacter"> <!-- No tabs! -->
>          <property name="eachLine" value="true"/>
>      </module>
> +    <module name="RegexpSingleline"> <!-- excess whitespace -->
> +        <property name="format" value="\s+$"/>
> +        <property name="message" value="Excess whitespace at end of line"/>

Generally we call this "trailing whitespace".  I'd expect it to be referred to as such.
https://hg.mozilla.org/mozilla-central/rev/91fd28b61bad
https://hg.mozilla.org/mozilla-central/rev/07bbdd454906
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 48 → mozilla48
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: