BTW, the com.github.jakemarsden.git-hooks Gradle plugin is just syntax sugar w/o much capabilities (does not update hooks when you change in main
build.gradle)
https://www.git-scm.com/docs/githooks is a long read but all is there!
So maybe we don't even need to keep the plugin and rather suggest users to refer to Git documentation (link above) in OFBiz documentation with some
examples like:
.git/hooks/pre-push:
#!/bin/bash
./gradlew checkstyleMain
Thanks Aditya for all your work that clarified the situation which was not so
clear to me
Jacques
Le 13/06/2020 à 10:16, Jacques Le Roux a écrit :
Hi All,
I have finally pushed a pre-push hook rather than a pre-commit hook.
I noticed that this does not clear the existing pre-commit hook in .git\hooks.
You have to clear it by hand.
But anyway, I believe we should rather use a webhook as proposed by Infra. This
for at least 3 reasons:
1. Handles PRs and not only local commits
2. Minimise the CPU usage locally
3. Simplify usage for custom projects
The next step is to comment out the feature and let people know it exists in
documentation.
This in order for committers who prefer to check before pushing but tend to
forget.
And for possibly interested custom projects.
I'll do so and ask Infra to create a webhook (INFRA-20314) after the weekend if
nobody is against
Jacques
Le 12/06/2020 à 13:41, Jacques Le Roux a écrit :
Hi,
As you can see at OFBIZ-11304, Aditya increased the possibility of the
pre-commit hook.
I think we can use that right now, and see if ever we get issues which I doubt
after testing.
Thanks
Le 06/06/2020 à 05:08, James Yong a écrit :
Hi all,
+1 to INFRA-20314.
Committer should install a checkstyle plugin in the IDE pointing to our
checkstyle.xml.
This helps to highlight Lint errors so that style issues can be corrected early.
Regards,
James
On 2020/06/05 17:30:18, Jacques Le Roux <jacques.le.r...@les7arts.com> wrote:
Hi All,
Since then we also created INFRA-20314
At OFBIZ-11304 Aditya suggested something else. To use a Gradle plugin to add
pre-commit hook.
I tested it, it does not prevent a committer to push changes even if they
increase the number of check style issues.
I'd like to know what the community prefers:
* Prevent a committer to push changes even if they increase the number of
check style issues. This implies to implement INFRA-20314
* Allows a committer to push changes even if they increase the number of
check style issues. Then we could use OFBIZ-11304 only.
What do you think? If we can get to a consensus we might start a vote
Thanks
Jacques
Le 03/12/2019 à 09:42, Jacques Le Roux a écrit :
Hi Nicolas,
Great, I think we should use it as a team, nobody against?
Jacques
Le 03/12/2019 à 09:21, Nicolas Malin a écrit :
I haven't plugin installed, only famework.
Thanks for your sharing a will use that.
Nicolas
On 02/12/2019 17:32, Jacques Le Roux wrote:
Le 30/11/2019 à 08:58, Jacques Le Roux a écrit :
I think we should rely on a Checkstyle pre-commit hook:
https://gist.github.com/davetron5000/37350 to complement
tasks.checkstyleMain.maxErrors
So every committer would have it installed locally and the problem would be
gone \o/
What do people think?
Jacques
I created https://issues.apache.org/jira/browse/OFBIZ-11304 for that
Jacques