Hey Android devs.

I added checkstyle to save us time in review – no more typing `nit:` and no
more added review passes to fix style. That being said, we can only save
time if we use it! If you find yourself typing `nit:` in review, make sure
the assignee has run checkstyle locally or checkstyle has passed a try
build. If the style nit is not caught by checkstyle, please file a bug
blocking [1] and CC me! We can add more checkstyle checks and save more
time!

I'm working to get checkstyle to block pushes [2] so in the future, you may
only see style nits in review that weren't caught by checkstyle – I'll let
you know when that happens.

fwiw, I've added checks for the nits I see most often in review so, unless
you file bugs, I don't intend to add new checks for the time being (patches
welcome!).

After this email, I'll try to keep it down about checkstyle. :P

---
*Feel free to skip if you don't care about specific checkstyle checks.*

I landed some changes [3] to check for whitespace style, e.g. `1+1` is no
longer valid and should be `1 + 1`.

One note: `{}` is acceptable in some cases (e.g. empty constructors) but
not others (e.g. empty catch blocks). If you hit a warning for `{}`, you
should take a step back and consider whether or not you should do something
there. For example, in a catch block, it's better to log or at least add a
comment (e.g. `{ /* a comment */ }`. That being said, if you really don't
want to do anything can get around this limitation by adding a space: `{ }`.
- Mike

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1258786
[2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1263201
[3]: https://bugzilla.mozilla.org/show_bug.cgi?id=1258789
_______________________________________________
mobile-firefox-dev mailing list
mobile-firefox-dev@mozilla.org
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to