![]() ![]() Curly BracesĪlways use braces, even around one-line `if`, `else` and other control statements. ![]() Use spaces, not hard tabs, for indentation. Improve code readability by grouping individual statements into block statements and uniformly indent the content of each block to set off its contents from the surrounding code. Limit your source code line length to 100 characters. Some source code files contain UTF-8 characters and will be damaged if you modify them with an editor that does not support UTF-8 encoding. ![]() Use UTF-8 file encoding and Unix line separators. Formatter settings for Eclipse and IntelliJ are covered first, followed by more detailed descriptions. Most of the formatting conventions for this project center around the use of white space and the placement of brackets. In order to create a source base that has a unified appearance and is easy to read and comprehend we include conventions for formatting Java code. This includes code documentation (javadocs). Rewriting old code simply to change its style may result in the introduction of costly yet avoidable defects.Īpply these rules to any code you write, not just code destined for production or only if it is visible to the user. The use of different styles within a single source file produces code that is more difficult to read and comprehend. Do not introduce a new coding style in a modification, and do not attempt to rewrite the old software just to make it match the new style. ![]() When modifying existing software, your changes should follow the style of the original code. al.Īs an open-source project we are following the Google Java Style guide, emphasizing a few of the more important points in this page. Java code for the Geode project was originally developed using conventions based on The Elements of Java Style, by A. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |