UWB-Biocomputing / WorkBench

Software and data provenance management platform for simulations of dissociated cortical cultures.
https://uwb-biocomputing.github.io/WorkBench/
Apache License 2.0
1 stars 3 forks source link

Apply Java coding standard using Checkstyle #78

Closed stevecl5 closed 3 years ago

stevecl5 commented 3 years ago

Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It is available as a Maven plugin, allowing for automation of code style checking as part of the build process.

stevecl5 commented 3 years ago

created a feature branch for this issue

stevecl5 commented 3 years ago

The two main code styles supported by Checkstyle are Sun's Java Style and Google's Java Style. Both of these have off-the-shelf configuration files for easy integration into the Maven build process. These configurations can also be modified for our purposes if we want to modify or suppress certain checks.

I am using Sun's Java Style which is based on the official Java Coding Conventions as the starting point for a custom Checkstyle configuration. I found that Google's Style guide was overly restrictive and contained some unusual style choices (such as 2-space indentations).

stevecl5 commented 3 years ago

Current modifications to sun_checks.xml:

stevecl5 commented 3 years ago

Additional modifications:

Note: Setting max line length to 100 allows for side-by-side code comparison and may improve viewing on small screens.