- Notifications
You must be signed in to change notification settings - Fork 45
Add pre-commit hook pipeline parameter to install-hooks #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can you tell me what kind of output you are trying to silent? Isn't that already fixed by fa64cf7? If the goal is to quiet the pre-commit hook, I don't see why the quiet parameter is passed to https://github.com/Cosium/maven-git-code-format/blob/aed2891c82b6fdde1014c7b8434a52fa23d15910/src/main/java/com/cosium/code/format/InstallHooksMojo.java#L30 instead of https://github.com/Cosium/maven-git-code-format/blob/aed2891c82b6fdde1014c7b8434a52fa23d15910/src/main/java/com/cosium/code/format/OnPreCommitMojo.java#L16 ? |
'quiet' will prevent maven output during the git pre-commit hook. Without quiet, I see $ git commit -m "Update dependency versions; reformat to Google code standard" [INFO] Scanning for projects... [INFO] [INFO] -------------------< org.honton.chas.version:semver >------------------- [INFO] Building semver 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-git-code-format:1.40-SNAPSHOT:on-pre-commit (default-cli) @ semver --- [INFO] Executing pre-commit hooks [INFO] Formatting lines [[1..55)] of 'src/main/java/org/honton/chas/version/JarVersions.java' [INFO] Formatted lines [[1..55)] of 'src/main/java/org/honton/chas/version/JarVersions.java' [INFO] Formatting 'src/main/java/org/honton/chas/version/SemVer.java' [INFO] Formatted 'src/main/java/org/honton/chas/version/SemVer.java' [INFO] Formatting 'src/main/java/org/honton/chas/version/VersionExtractor.java' [INFO] Formatted 'src/main/java/org/honton/chas/version/VersionExtractor.java' [INFO] Formatting 'src/main/java/org/honton/chas/version/VersionMatcher.java' [INFO] Formatted 'src/main/java/org/honton/chas/version/VersionMatcher.java' [INFO] Formatting 'src/test/java/org/honton/chas/version/JarVersionsTest.java' [INFO] Formatted 'src/test/java/org/honton/chas/version/JarVersionsTest.java' [INFO] Formatting 'src/test/java/org/honton/chas/version/SemVerTest.java' [INFO] Formatted 'src/test/java/org/honton/chas/version/SemVerTest.java' [INFO] Formatting 'src/test/java/org/honton/chas/version/VersionExtractorTest.java' [INFO] Formatted 'src/test/java/org/honton/chas/version/VersionExtractorTest.java' [INFO] Formatting 'src/test/java/org/honton/chas/version/VersionMatcherTest.java' [INFO] Formatted 'src/test/java/org/honton/chas/version/VersionMatcherTest.java' [INFO] Executed pre-commit hooks [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.739 s [INFO] Finished at: 2020-02-23T12:37:50-08:00 [INFO] ------------------------------------------------------------------------ [master 6021b1d] Update dependency versions; reformat to Google code standard 10 files changed, 201 insertions(+), 140 deletions(-) $ With quiet=true, I see
|
The additional log messages during An alternative to quiet parameter might be to allow configuration of the pipeline command. A configuration of Please let me know what your preference would be so that I can modify this pull request. |
Thanks ! |
setting quiet to true will quiet pre-commit hook
added example profile that executes install-hooks only when pre-commit file is missing