openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1015) Enforce 80-column line width for source code
Date Wed, 01 Apr 2009 12:43:22 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694504#action_12694504
] 

Michael Dick commented on OPENJPA-1015:
---------------------------------------

Part of our original mandate was to use the Sun Java code conventions. Enforcement of the
rules has been part of the code review process and we've grown lax on things like brackets
for one line if statements. 

Rather than writing a new tool to enforce this rule I'd prefer to use the maven-checkstyle-plugin
[1] which validates multiple code formatting rules on each build. If we enable all the Sun
code formatting rules today we have thousands of issues to fix which is too unwieldy to address.

I propose starting with a custom set of rules [2] that only enforces column length. Cleaning
up the files in one big commit and then slowly extend the rules (cleaning as we go). 

[1] http://maven.apache.org/plugins/maven-checkstyle-plugin/index.html
[2] http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/custom-checker-config.html

I'm happy to add the plugin and start on the line limits if other devs like this approach.


> Enforce 80-column line width for source code
> --------------------------------------------
>
>                 Key: OPENJPA-1015
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1015
>             Project: OpenJPA
>          Issue Type: Test
>            Reporter: Pinaki Poddar
>         Attachments: line80.txt, TestLineWidth.java
>
>
> There used to be a rule of 80-column width for source code.
> That rule is slowly yielding. 
> Should we add a test case to catch such violation?
> Or should we not reignite the age-old battle about line width, placement of brackets
etc?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message