- Commit messages should be reasonably informative. They should describe what was changed (which area/subsystems of the code, not the files themselves, as that information is already displayed by git), in which way they were changed and the rationale behind the change. Any known bugs or limitations should be described, as well which other subsystems are impacted, if any.
- If there's an associated ticket, it should be mentioned.
- Formal requirements of commit messages are explained in this web page. To know: the first line should have not more than 50 characters (if possible), the following one should be empty and the other lines should be wrapped at 72 characters. Long text that should not be wrapped (like long URLs) can exceed 72 characters.
Please follow these conventions when submitting new code:
- Java code should follow the Code Conventions for the Java Programming Language.
- Groovy code should follow the Java conventions mentioned in 1., modified by the Groovy guidelines.
- The Java conventions define the unit of indentation as 4 spaces, but leave unspecified whether tabs or spaces should be used. For this project, spaces should be used for indentation. The rationale is the same mentioned here.
- Unix line endings should be used. The working directory can use Windows line endings, as long as these are not committed. New projects should enforce this with a .gitattributes file; since this would involve mass converting all files in transmartApp and thus polluting the history, the conversion should be done on a per-file basis, when it's first touched. Windows machines should be properly configured so that they commit LF line endings. You can change the value of Git's core.eol and core.autocrlf so that the files are checked out with CRLF line endings, if you prefer, but make sure that the combination you choose does not result in CRLF line endings being committed, especially in files that were already using LF line endings.
- An empty line should always be included at the end of the file.
- Do not include trailing whitespace, including on blank lines. 7.Aim for 80 character margins. In highly indented code (which should nevertheless be avoided), try not to exceed 120 characters per line.
- Remember to use 8 space continuations (not 4 spaces), as described in the Java code conventions.
- If you are going to fix the conventions on a file and also change it substantially, do it in two separate commits so that the substantial changes can be reviewed more easily.
An IntelliJ code style file is available. This is a non-authoritative work-in-progress. Copy it to ~/.IdeaDirectory/config/codestyles and restart transmart. You should now find the code style transmart under Settings > Code style. You should also go to Settings > Editor, change Strip trailing spaces on Save to Modified Lines and check Ensure line feed at file end on Save.