-
- Organizations involved and roles
-
-
- Understanding the code base
- Application architecture
- Domain objects
- Other design topics
This page gathers all the rules and habits that have been taken by the contributors on the Sigmah code. It is useful to read it as an introduction when joining the project, to be acknowledgeed of how to fit your contribution in the same trend, in order to keep the development and the final perception of the user homogeneous.
Later on, if you perceive explicitly a new habit or wants to describe an implicit rule, you're welcome to update this page !
We are several organizations and individuals working at the same time on the Sigmah codebase. To make this collaboration smooth for everyone requires the respect of several good housekeeping rules on our Git source code management.
If you want your contribution to be welcomed, make sure you publish your work in a friendly manner.
Write good commit messages, explain what you did :
issue #1234, bug #1234, refs #1234, reports #1234 or if you want in the same time to set the issue as resolved you can use either Fixes #1234, fixes #1234 or resolves #1234To prevent merge conflicts, the more you anticipate merging, the more your contribution is likely to be accepted.
pull --ff the official repo master in your fork master frequently to be up-to-date. Merge only when necessary. Rebase your local commit/branches as you want but do not rebase already pushed commits (or you might create duplicate commits).gitignore and .gitattributes files, it will probably be rejected in a pull-request. Any temporary or generated files should go to the target directory.If you need to change the database schema to make your piece of code works, it's OK, but we want to keep a read-only history of all those modifications.
Your pull-request must come with a migration file, like src/main/resources/db/migration/V1234__adding_a_table_to_store_my_super_anything.sql. This file name contains the schema version, please just number it after the others files, and after the __, a brief description of your changes.
You can get more info in the official Flyway documentation.
UIConstants, UIMessages and MailModels properties files, developers should avoid to edit the translated version of them. The French or Spanish developers can write the translation in their mothertongue of the new strings they create as part of the comment of the string in the original file.***.properties files (without suffix) in the part dedicated to the version on which they work, and if possible always with a comment which may include the translation in the mothertongue for Spanish or French developers***_$$.properties files (with suffix)Well, we won't discuss about how to produce good code, there are thousands of great literature about the topic.
Here are few coding guidelines that you should consider:
final keyword is on nearly every variables and method parameters), it made the code saferswitch-case or else if structures, always implements a good default (always have a default: case or else with throwing an Exception or something). Think about a future developer who adds an element to an enumeration and this same developer forget to add a case in your code, did the code fail fast with an exception telling that this enumeration element is not implemented or do your code silently fall in another case leading to an expected behavior? Make the future developer (future you?) happy.throw (it will help when analyzing a stacktrace even if the code raising the exception has moved)catch clause, always include the root exception that lead to you throwing another exception