[
https://issues.apache.org/jira/browse/HCATALOG-486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Travis Crawford updated HCATALOG-486:
-------------------------------------
Attachment: HCATALOG-486_checkstyle.2.patch
Updating this patch because while playing around with what rules are available,
I found one for checking file headers. Turns out we have a bunch of files with
missing headers.
This update adds checkstyle support for ensuring java files have the correct
Apache header, and I normalized them all to the expected header. Now we'll have
an easy way to ensure all files have the correct header, rather than having to
remember each time we add a file.
> HCatalog should use checkstyle to enforce coding style
> ------------------------------------------------------
>
> Key: HCATALOG-486
> URL: https://issues.apache.org/jira/browse/HCATALOG-486
> Project: HCatalog
> Issue Type: Story
> Reporter: Travis Crawford
> Assignee: Travis Crawford
> Attachments: HCATALOG-486_checkstyle.1.patch,
> HCATALOG-486_checkstyle.2.patch
>
>
> Currently HCatalog uses a variety of coding styles, making it very
> challenging to configure an editor for format code correctly, and making it
> harder to read/maintain than necessary.
> Checkstyle is an open-source tool for checking source code against a style
> policy, which when integrated with the build allows one to enforce the policy.
> Of course, there's a delicate balance between imposing a convention vs.
> allowing developers to solve problems in their own way, and we need to be
> cognizant of that balance.
> I think we should integrate checkstyle with our build, initially with a set
> of policies I think are pretty obvious: basically stuff like no unused
> imports, and no ridiculously long files. Over time we can define new
> policies, and cleanup the code to match, knowing that that particular issue
> won't sneak back in.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira