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
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
- 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.