COSTA Coding Rules
This page lists a series a rules which every COSTA developer should follow.
- Do not commit code which does not compile.
- Do not commit code which issues compilation warnings
- Run the regression tests before committing your changes:
- If the tests succeed, you can proceed with the commit
- Otherwise, a problem is found and it should be fixed before committing
- Do not modify code in modules that you are not the author
- Please contact the module author first
- If you do not know who is the author, please ask in the costa-devel list
- Always write in standard Prolog, if you need a library predicate youshould define it in lib/utils
- Do not commit any .class file for which we have the source file.
- Never ever use paths to your own directory, use the install_dir/2 from global_setting to go the absolute path-name to the analyzer's sub-directories
Coding Style
If you are not an expert Prolog programmer, it is probably a good idea that you read a good style guide. Other rules follow:
- When you add a new file to the repository, please do not forget to add the copyright header and a description of the module in SWI documentation style.
- Whenever you add a new procedure to an existing module, please add documentation to the corresponding procedure, using SWI documentation style.
Use of Subversion
- You should never add to the repository files which are automatically generated
- Those files which are automatically generated and are not ignored when executing "svn st" should be added to the files for the corresponding directory which svn should ignore. The idea is that unless you have edited something, executing "svn st" at a working copy of COSTA should only mention that there are some external repositories, nothing else.