Skip to content

Conversation

@bagerard
Copy link
Contributor

Relates to #689
It adds a verbose flag that can be set per hook and that allows stdout to be printed even when hook returned 0

Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I think only the first test is necessary -- let's remove the other two (they're well written 👏 -- but not necessary)

(b'Hello World',),
0,
stage=False,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test is probably sufficient, the others I don't think are super necessary (we already test all three of those scenarios)

@asottile
Copy link
Member

Also looks like there's a test that needs 'verbose': False here:

'exclude_types': [],
}

@bagerard
Copy link
Contributor Author

Thanks @asottile for the immediate review. Should I do a PR to document the flag in pre-commit.github.io ?

@asottile
Copy link
Member

@bagerard that would be awesome :) source is https://github.com/pre-commit/pre-commit.github.io (branch from real_master)

@asottile
Copy link
Member

Oops, one small comma needed :) (pre-commit && pre-commit run --all-files will put it there for ya)

@bagerard
Copy link
Contributor Author

bagerard commented Feb 1, 2018

Indeed I should have thought to run pre-commit on pre-commit :) Here you go

@asottile asottile merged commit 17444cd into pre-commit:master Feb 1, 2018
@asottile
Copy link
Member

asottile commented Feb 1, 2018

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants