GitHub user chenlica closed a discussion: Java Coding Conventions (from old wiki)
>From https://github.com/apache/texera/wiki/Java-Coding-Conventions (may be >dangling) ===== Author: Zuozhi Wang This document specifies the coding conventions in Texera project. 1. Use **spaces** instead of tabs. Configure your IDE or text editor to use 4 spaces instead of tabs. [In Eclipse](http://stackoverflow.com/questions/407929/how-do-i-change-eclipse-to-use-spaces-instead-of-tabs) In IntelliJ, uncheck `use tab character`. The reason is that Github shows tab as 8 spaces, thus leading to inconsistency of indentations. Different people may have different configurations, which may mess up the space / tab and show a lot of changes in git diff. 2. Use camel case, e.g. `SampleClass`, `sampleVariable` For constants, use all upper case with underscores, e.g. `SAMPLE_CONSTANT` 3. Use the following indentation style ```Java /** * Don't forget to write JavaDoc comments. */ public void sampleFunction(int x) { // leave one space before bracket { if (x > 0) { doSomething(); } else { doSomethingElse(); } } ``` GitHub link: https://github.com/apache/texera/discussions/3973 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
