Closed GoogleCodeExporter closed 9 years ago
I agree that consistency in style would be really good to have, but I don't
feel good about doing it at the cost of IDE neutrality.
Original comment by bgran...@harris.com
on 9 Mar 2011 at 2:48
This link describes a number of code formatter options
http://stackoverflow.com/questions/996646/stand-alone-java-code-formatter-beauti
fier-pretty-printer
Code formatting can be achieved with IDE neutrality by
1) Using a code formatter api
2) and minimally running the formatter prior to major and minor releases
3) If this route is chosen then in my mind the code formatter should be applied
ASAP and then as 2 states.
4) Ideally the formatter would be run prior to checkin and having a script or
maven integration would allow for developers who follow the process to do so
This ensures that the source base is leaning towards a uniform format and is
IDE agnostic. In my mind the benefits greatly outway the little extra work.
Noting that if the plugin is a maven plugin you can have a target which is run
prior to said releases or developer can run prior to checkin. Ultimately code
format (on release) would be responsibility of releasing engineer.
Diffs and merges are unnecessarily complicated by code bases which do not
employ uniform code format.
The effort here is minimal.
Original comment by jwein...@gmail.com
on 9 Mar 2011 at 5:23
[deleted comment]
Here is a referenced link which describes an api for formatting via the command
line
http://www.peterfriese.de/formatting-your-code-using-the-eclipse-code-formatter/
As a clarification IDE agnostic can mean that a specific IDE is not required
for development. This does not necessitate that formatting does not require a
specific tool. In this case eclipse can be used to standardize formatting.
Other options exist. See link in prior comment.
Original comment by jwein...@gmail.com
on 9 Mar 2011 at 5:33
Original comment by bgran...@harris.com
on 10 Mar 2011 at 8:03
Original comment by bgran...@harris.com
on 20 Apr 2011 at 7:36
Original comment by gm2...@cerner.com
on 8 Sep 2011 at 7:39
Original issue reported on code.google.com by
jwein...@gmail.com
on 8 Mar 2011 at 2:15