You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Pi Song (JIRA)" <ji...@apache.org> on 2008/02/29 16:02:51 UTC

[jira] Commented: (PIG-128) Incorporate CheckStyle into Pig build.xml (experimental)

    [ https://issues.apache.org/jira/browse/PIG-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573774#action_12573774 ] 

Pi Song commented on PIG-128:
-----------------------------

- If you feel like we should also check test code, go for it.
- for build-lib, I want to seperate jars that we use to perform various things in the build process (Style Check, Code coverage, etc.. ) from jars that we need at runtime. If you have a better solution, also go for it!
- I generated the patch from eclipse, just found out that by default it doesn't include binary files. But then after I checked "include binary file" eclipse just gets frozen. Anyone knows a way to work around this?


People giving out suggestions. This is what I expected from creating this JIRA issue. However please don't miss out the more important question - *Do you agree with the approach?*

> Incorporate CheckStyle into Pig build.xml  (experimental)
> ---------------------------------------------------------
>
>                 Key: PIG-128
>                 URL: https://issues.apache.org/jira/browse/PIG-128
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.1.0
>            Reporter: Pi Song
>             Fix For: 0.1.0
>
>         Attachments: checkstyle-all-4.4.jar, PIG-128-v02.patch, pig_checkstyle1.patch
>
>
> As discussed in the mailing list, now I have included CheckStyle as a part of the build process. Some might agree and some might not agree. Please note that initially *this is only for experimental purpose*. 
> In my opinion, this is a systematic way to control coding style as you expect more and more people coming to help, you will need a good system to support.
> *Proposal*
> +Stage1+
> - Checkstyle will run as a part of build process. The output file will be created at build/checkstyle/checkstyle-report.txt. This only took a few more seconds in my slow development box.
> - At the moment sun's guideline is used with special exceptions Indentation=4 and neglecting package.html requirement.
> - Failures on Checkstyle will not cause the build to be broken at this stage as this will only provide guideline for developers and for committers to make decisions whether the patch is ready to be committed. Basically new patches should not introduce more violations.
> - From time to time, we should spend some time cleaning up code to reduce the number of violations. Before, people just did clean-up and check-in believing the code would be cleaner. Now you will have a good indicator to showcase your achievement.
> +Stage2+ (don't know when yet)
> - It's interesting that some checks in Checkstyle can help us eliminate unforseen bugs such as DoubleCheckingLock, EqualsHashCode, MagicNumber, or StringLiteralEquality. These checks should be enforced as errors and break the build. The set of such hard checks needs us all to decide. (see http://checkstyle.sourceforge.net/config_coding.html)
> From my test, currently we have around 10000 violations. 
> Awaiting for suggestions!!!

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