Skip to content
This repository was archived by the owner on May 25, 2020. It is now read-only.

coding conventions

Thomas Pummer edited this page Jun 7, 2013 · 5 revisions

Naming and Formatting

TrayRSS is written according to the official Java Coding Conventions. For code formatting see the subfolder [qs] in the source. There you can find an Eclipse Code Formatter Ruleset.

Have your pendant of "Format on Save" and "Organize Imports on save" in the ide of your joice turned on.

static code analysis

Yep the following paragraphs sounds pretty similar, because they are! The tools are there to improve the quality of our coding, and to provide a standard way how things are solved. Therefore we hopefully can reduce bugs and increase readabilty. So please don't take it personal if your code doesn't match those rules and make it compatible.

Feel free to improve rule compilance, even for the non critical rules. This is a quite handy way to get in touch with the source of TrayRSS.

Checkstyle

To help you matching the coding conventions we make use of checkstyle.

To run checkstyle use the mavengoal checkstyle:check or checkstyle:checkstyle. Checkstyle is integrated to the test phase of the build cycle of TrayRSS, so if there are some major problems with the source, the build will fail to preserve the source from failures. If you are in this position, fix em and try it again! Any questions about your failure? Contact us!

You find the flaws detected by checkstyle in the target folder of the components in the file checkstyle-result.xml.

To see the used checkstyle rules see the [qs] folder in the source.

Findbugs

To garantee a minimum quality TrayRSS uses FindBugs as a static code analysis tool that analyses Java bytecode and detects a wide range of problems.

To run findbugs use the mavengoal findbugs:check or findbugs:findbugs. Findbugs is integrated to the test phase of the build cycle of TrayRSS, so if there are some major problems with the source, the build will fail to preserve the source from failures. If you are in this position, fix em and try it again! Any questions about your failure? Contact us!

You find the flaws detected by findbugs in the target folder of the components in the file findbugs.xml.

To see the used FindBugs rules see the [qs] folder in the source.

PMD

For the same reasons we use FindBugs, we use PMD too.

To run PMD use the mavengoals pmd:pmd or pmd:check. PMD is also integrated to the test phase of the build cycle of TrayRSS, so if there are some major problems with the source, the build will fail to preserver the source from failures. If oyu are in this position, fix em and try it again! Any questions about your failure? Contact us!

You find the flaws detected by PMD in the target folder of the components in the file pmd.xml.

To see the used PMD rules see the [qs] folder in the source.

Code coverage

Clone this wiki locally