Enforce max line length of 120 characters in Java files

Peter Palaga ppalaga at redhat.com
Tue Dec 16 16:19:02 UTC 2014


Hi *,

this was discussed already to some extent on IRC. As it stands ATM, we 
do not check the line length for any file type during Maven build.

As the first step in this area, I propose to introduce the line length 
limit of 120 chars for Java files. The value 120 is given by what GitHub 
is able to display without horizontal scrollbar - see [1] and [2]

The PR for rhq-checkstyle-config: [3]
The impact on rhq-metrics: [4]

Are there any concerns about this?

[1] 
https://github.com/rhq-project/rhq-metrics/blob/b30bf59526774669f24d3a22a6c1da3edc1a5ae3/clients/ptranslator/src/main/java/org/rhq/metrics/clients/ptrans/MetricBatcher.java#L13

[2] 
http://stackoverflow.com/questions/22207920/what-is-githubs-character-limit-or-line-length-for-viewing-files-on-github

[3] https://github.com/rhq-project/rhq-checkstyle-config/pull/4

[4] https://github.com/ppalaga/rhq-metrics/tree/141216-max-line-length-java

Thanks,

Peter


More information about the rhq-devel mailing list