[jira] [Commented] (OFBIZ-11304) Install a Checkstyle pre-push (on every committer machine?)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-11304) Install a Checkstyle pre-push (on every committer machine?)

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-11304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17134330#comment-17134330 ]

ASF subversion and git services commented on OFBIZ-11304:
---------------------------------------------------------

Commit 4be47732c7b29b9cbae8675ff7d5686f4e84891f in ofbiz-framework's branch refs/heads/trunk from Aditya Sharma
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=4be4773 ]

Implemented: pre commit hook to check staged files with list issues (OFBIZ-11304)

* Implemented: pre commit hook to check staged files with list issues
(OFBIZ-11304)
Used git-hooks-gradle-plugin with MIT license that helps configure shared Git hooks with Gradle buildscript
https://github.com/jakemarsden/git-hooks-gradle-plugin

* Improved: used exisiting checkstyleMain to check for the voilations
(OFBIZ-11304)
checkstyleMain will only fail in case when maxErrors increases
Thank you Jacques for the suggestion

* Improved: getChangedFiles() to check all the files
(OFBIZ-11304)
Initially the method only checks for the java files, so removed the code to filter java files

* Removed: custom checkstyle gradle task
(OFBIZ-11304)
Existing checkstyleMain task fulfills the requirement


Thank you Jacques, Mathieu, Samuel, and Pierre for your valuable inputs.


> Install a Checkstyle pre-push (on every committer machine?)
> -----------------------------------------------------------
>
>                 Key: OFBIZ-11304
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11304
>             Project: OFBiz
>          Issue Type: Sub-task
>    Affects Versions: Trunk
>            Reporter: Jacques Le Roux
>            Priority: Minor
>             Fix For: Upcoming Branch
>
>
> The ofbizTrunkFrameworkPlugins build fails when a lint error is detected by the check gradle task. It's "hard" to exactly know from where lint errors  come among all still present.
> I think we should rely on a Checkstyle pre-commit hook like https://gist.github.com/davetron5000/37350 to complement tasks.checkstyleMain.maxErrors. This pre-commit hook prevents to commit when a lint error is present in the commit.
> Every committer would have it installed locally and the problem would be gone with some committers good will. I started a discussion about it at https://markmail.org/message/guxbsvdkzky7gtdx. Jacopo made the same proposition years ago: https://markmail.org/message/gkgmko4axj3vtnv3



--
This message was sent by Atlassian Jira
(v8.3.4#803005)