coala / coala-bears

Bears for coala
https://coala.io/
GNU Affero General Public License v3.0
296 stars 580 forks source link

GitCommitBear writes redundant messages to stdout #2374

Closed li-boxuan closed 6 years ago

li-boxuan commented 6 years ago

When I run GitCommitBear, it writes the following log messages to stdout:

[nltk_data] Downloading package punkt to /Users/xx/nltk_data... [nltk_data] Package punkt is already up-to-date! [nltk_data] Downloading package averaged_perceptron_tagger to [nltk_data] /Users/xx/nltk_data... [nltk_data] Package averaged_perceptron_tagger is already up-to- [nltk_data] date!

Even if I run with option --json, it still writes those logs to stdout. This is annoying because it breaks json syntax (output cannot be directly loaded as json).

The way to reproduce this bug is to run coala --json > output.txt in the root directory of coala repository.

I'm not sure if this is a common bug or it just doesn't work on my machine.

gitmate-bot commented 6 years ago

GitMate.io thinks possibly related issues are https://github.com/coala/coala-bears/issues/942 (GitCommitBear: Make the regex match message more verbose), https://github.com/coala/coala-bears/issues/2031 (GitCommitBear: Exception on empty commit message body), https://github.com/coala/coala-bears/issues/365 (GitCommitBear: Check for "wip" at staart of commit message), https://github.com/coala/coala-bears/issues/1134 (GitCommitBear: Require the commit message contains a valid issue reference), and https://github.com/coala/coala-bears/issues/1394 (PycodestyleBear and LineLengthBear print redundant messages).

rohanrk commented 6 years ago

As stated in the previous issue, I'd like to work on this

jayvdb commented 6 years ago

These should be converted to logging.

virresh commented 6 years ago

@rohanrk Are you working on this ? I would like to work on this otherwise :sweat_smile: