Enforce max line length of 120 characters in Java files

Jay Shaughnessy jshaughn at redhat.com
Tue Dec 16 16:39:00 UTC 2014


120 is what we have been using for RHQ and I think is a good limit to 
enforce.  Well, not just enforce, lines that are too short should be 
extended by the auto-formatting.

On 12/16/2014 11:19 AM, Peter Palaga wrote:
> 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
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel



More information about the rhq-devel mailing list