tommarshall / git-good-commit

Git hook to help you write good commit messages, with no external dependencies.
MIT License
195 stars 33 forks source link

#17 Enables non-interactive usage #18

Closed ssbarnea closed 7 years ago

ssbarnea commented 7 years ago

Regarding the other question, it outputa to stderr instead of stdout. All tools are supposed to use stderr for warnings and errors, not stdout. stdout is reserved for "normal"/expected output. When doing a linter you do send errors to stderr. So no output is good news for a linter :)

tommarshall commented 7 years ago

Are the validation warnings not the normal/expected output in this context?

Both linters that I have to hand (jshint & rubocop) seem to output their linting warnings to stdout, and general errors, e.g. can't open a file to stderr.

Do you have examples of linters that do output their linting warnings to stderr?

tommarshall commented 7 years ago

Thanks again for raising the issue, and submitting the solution.

I've incorporated your fix for the non-interactive usage in #25, which has been merged.

I'm going to close this PR. Happy to continue the discussion of the stderr/stdout (https://github.com/tommarshall/git-good-commit/pull/18#issuecomment-297940371) in a separate issue or PR.