Better explain our code style
This commit is contained in:
parent
81c44ef4ae
commit
14a38f2f50
17
HACKING.md
17
HACKING.md
@ -4,18 +4,23 @@ F-Droid Client Hacking Doc
|
|||||||
Style
|
Style
|
||||||
-----
|
-----
|
||||||
|
|
||||||
We follow the [Google Java style](https://google-styleguide.googlecode.com/svn/trunk/javaguide.html).
|
We loosely follow the [Google Java style](https://google-styleguide.googlecode.com/svn/trunk/javaguide.html).
|
||||||
Some of its points are:
|
Some of the points we follow the most are:
|
||||||
|
|
||||||
* Four space indentation
|
* Four space indentation
|
||||||
* UTF-8 source files
|
* UTF-8 source files
|
||||||
* Exactly one top-level class per file
|
* Exactly one top-level class per file
|
||||||
* No wildcard imports
|
* No wildcard imports
|
||||||
* Braces are always used and follow K&R
|
* One statement per line
|
||||||
* Commented fallthroughs
|
* K&R spacings with braces and parenthesis
|
||||||
|
|
||||||
We didn't follow any style before but generally it was more or less like
|
Some other interesting additions we might use in the future:
|
||||||
Google's. As we make the switch, we encourage devs to follow this new format.
|
|
||||||
|
* Commented fallthroughs
|
||||||
|
* Braces are always used after if, for and while
|
||||||
|
|
||||||
|
We don't strictly follow the entire style spec, but when in doubt you should
|
||||||
|
follow it.
|
||||||
|
|
||||||
Building
|
Building
|
||||||
--------
|
--------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user