imglib / imglib2

A generic next-generation Java library for image processing
http://imglib2.net/
Other
293 stars 93 forks source link

Draft: modifying the imglib2 coding style demo #328

Closed maarzt closed 11 months ago

maarzt commented 1 year ago

There are some problems with the imglib2 coding style.

  1. It generates very long lines, because many intentionally set line breaks are removed.
  2. Comments at the end of a line are wrapped in a ugly manner. ... See https://github.com/scijava/scijava-coding-style/pull/7 for detials.

We (@stefanhahmann and I) tried to solve these problems to get an "imglib2" like coding style, that could be used in practice without causing to much trouble. The main change is that the "modified imglib2 coding style" is more relaxed in terms of line breaks. It allows developers to more freely decide when there should be a new line.

This PR shows the changes the "modified imglib2 coding style" would do on the imglib2 source code. It is not meant to be merged. It's for you @tpietzsch @StephanPreibisch @axtimwalde to get an opinion. If the "modified imglib2 coding style" is ok for you or do we need to keep the original coding style.

NB: The "modified imglib2 coding style", does less changes to the source code. Applying the old imglib2 coding style the the imglib2 source code changes 362 files. The "modified imglib2 coding style" changes 289 files.

Please comment here: https://github.com/scijava/scijava-coding-style/pull/7

For comparison: Here are the changes that the original imglib2 coding style would apply on the imglib2 source code.