[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=17136784#comment-17136784 ]

Jacques Le Roux commented on OFBIZ-11304:
-----------------------------------------

OK, [I had a discussion with Daniel Gruno on Infra Slack Channel|https://issues.apache.org/jira/browse/INFRA-20314?focusedCommentId=17135759&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17135759] and clearly they can't install a git checkstyle pre receive hook as requested in INFRA-20314. I have to check:
https://github.com/isaacs/github/issues/1002
https://github.community/t/pull-request-action-does-not-run-on-merge/16092

Here are my thoughts for now.

h6. Drawbacks with our current solution:
# We can't prevent PR merges to contain style issues.
# It consumes CPU locally
# It forces users to use it OOTB (but they can bypass or remove by hand easily, see below)
# What about checking branches? The hook is present in all branches but not checkstyle

h6. Advantages of our current solution:
# Check the compilation, tests (not integrations tests) and style, before pushing
# Can be bypassed by using --no-verify option or removing the hook by hand in build.gradle


> 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
>            Assignee: 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)