Skip to content, Skip to search

Changes

Coding style

834 bytes removed, 9 July
Remove section about header structure
{{DevelopmentDevelopMenu}}
We make a serious effort to keep the ImageJ codebase clean, consistent and easy to read—which includes both the source code and the revision history.
You can import them to your system using {{bc | File | Import | Preferences}} and selecting the <code>eclipse-preferences.epf</code> file. Then, in Eclipse preferences, navigate to {{bc | Java | Code Style | Clean Up}} and select "ImageJ" for the active profile. You can then format your source code by right-clicking your source file(s) and choosing {{bc | Source | Clean Up}} from the context menu. As of this writing, these rules are not automatically applied by CI, but we make an effort to apply them to the codebase occasionally by hand.
 
== Header structure ==
We provide a script called {{GitHub|repo=imagej|path=bin/check-headers.pl|label=check-headers.pl}} that checks ImageJ source files for header correctness. This script checks for various issues, such as missing or incorrect license header, incorrect or misordered package and import statements, missing class Javadoc, missing author tag(s), and duplicate blank lines. These formatting rules are checked by CI via the [http://jenkins.imagej.net/job/ImageJ-style/ ImageJ-style Jenkins job], which means an email will be sent to the [[Mailing Lists|ImageJ-builds]] mailing list if the script finds any problems.
 
In the future, we may switch to [http://maven.apache.org/plugins/maven-checkstyle-plugin/ maven-checkstyle-plugin] to introduce additional formatting rules, but for now the script works well enough.
== Ordering of code blocks ==
Bureaucrat, emailconfirmed, incoming, administrator, uploaders
11,813
edits