Skip to content, Skip to search


Coding style

834 bytes removed, 10:17, 9 July 2019
Remove section about header structure
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/|}} 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 [ 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 [ 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