- follow the code coding conventions (see below)
- do not be misleading in terms of content (the code needs to do pretty much what the name and description say it does)
- have a business-friendly license (the default license is LGPL3)
- do not compete with existing SonarSource products (sorry, but we gotta pay the bills somehow)
- receive +1’s from three voting members of the development list and no -1’s for the initial release
To keep your plugin in the forge, it must remain in compliance with everything on the first list and:
be maintained over time (meaning you should pay attention to the mailing lists and respond to bugs and API changes)
receive at least one +1 from a voting member of the development mailing list for subsequent releases
If any of these requirements are not met, or stop being met (if, for example you change the license to one that’s not business-friendly) we may remove the plugin from the forge immediately
- The plugin must support
Java 5(Java 6 since March 2013). The Continuous Integration job uses Oracle JDK 6.
- The plugin is must be built with Maven 2.2.x or 3.x
- Do not commit incomplete changes (Git is not a backup system)
- Do not commit IDE files (.settings, .project, .classpath, .idea, *.iml, *.ipr, *.iws)
- Use meaningful comments when doing a commit, always with the JIRA key and title (e.g. "SONARPLUGIN-1234 add rule FOO") - see Note About Git Commit Messagesthis note about Git commit messages
- Subscribe to the mailing list email@example.com
- Overuse JUnit tests with the help of FEST Assert and Mockito
- Use comments and javadocs only when necessary
- Do not forget the license header on all Java and Ruby files
- Source code encoding should be set to UTF-8 to prevent cross-platform encoding issues. UTF-8 is specified in parent POMs, so it is used by Maven when building the projects. However, it may not be set by default in your prefered IDE. The best practice is to force it for all your source code.
- For Eclipse : go to "Preferences -> General -> Workspace" and force the "Text file encoding" to "UTF-8"
- For IntelliJ IDEA : go to "Settings -> File Encodings" and force the "IDE Encoding" to "UTF-8"
- Replace tabulations by 2 whitespacestab characters with 2 space characters
- Be aware of the inspection of plugins on Nemo