Skip to content
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

A way to suspend errors #1342

Closed
Nihisil opened this issue Feb 22, 2020 · 2 comments
Closed

A way to suspend errors #1342

Nihisil opened this issue Feb 22, 2020 · 2 comments
Labels

Comments

@Nihisil
Copy link

Nihisil commented Feb 22, 2020

Is there a way to suspend error for specific hooks?

Configuration:

  - repo: https://github.com/psf/black
    rev: 19.3b0
    hooks:
      - id: black
        language_version: python3.7
  - repo: https://gitlab.com/pycqa/flake8
    rev: 3.7.9
    hooks:
      - id: flake8
        additional_dependencies: [flake8-bugbear]

I want to see errors from flake8 always. And from black, I don't want to have a blocking commit error.

So, black will format files and show what files were formatted before commit, but these issues will not block the commit itself. Is there a configuration for behavior like that?

@Nihisil Nihisil changed the title Suspend error A way to suspend errors Feb 22, 2020
@asottile
Copy link
Member

Duplicate of #1086 #879 #806 #999 #747

there is no option because modifying the staging area is:

  1. not a safe operation
  2. not a correct operation
  3. would make several of the current supported features impossible

the specifics are outlined in the duplicates -- there are ways to break this and stage the files anyway but you do so at your own risk

@asottile
Copy link
Member

you may also find this useful (upvote if you found useful) -- but again this is strongly discouraged

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

No branches or pull requests

2 participants