[
https://issues.apache.org/jira/browse/OFBIZ-11304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17129268#comment-17129268
]
Aditya Sharma edited comment on OFBIZ-11304 at 6/9/20, 1:25 PM:
----------------------------------------------------------------
Hi Jacques,
The Gradle plugin creates a pre-commit file at .git/hooks which enable the
hook. So even if we switch the branch, as the pre-commit hook still exists on
the machine the hook is executed. We need to remove the pre-commit hook file
located at .git/hooks. We may face such issues till we do not have this
configuration on all the branches with right max error values. You can also
bypass it with --no-verify flag passed to commit command.
was (Author: aditya.sharma):
Hi Jacques,
The Gradle plugin creates a pre-commit file at .git/hooks which enable the
hook. So even if we switch the branch, as the pre-commit hook still exists on
the machine the hook is executed. We need to remove the pre-commit hook file
located at .git/hooks.
> 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)