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

Document how to only run pre-push with the pre-commit integration #9924

Open
davetapley opened this issue Sep 12, 2024 · 1 comment
Open

Comments

@davetapley
Copy link

Question

The pre-commit integration docs helpfully say:

[..] pylint -- due to its speed -- is more suited to a [..] git pre-push hook

And then gives an example .pre-commit-config.yaml which doesn't specify stages: [push].

As someone who isn't familiar with .pre-commit-config.yaml it took some digging to find the relevant documentation for pre-commit.

Would a PR be welcome to make include here?

Documentation for future user

Link to the relevant documentation for pre-commit.

A .pre-commit-config.yaml which includes stages:

- repo: local
  hooks:
    - id: pylint
      name: pylint
      entry: pylint
      language: system
      types: [python]
      stages: [push]
      require_serial: true
      args:
        [
          "-rn", # Only display messages
          "-sn", # Don't display the score
        ]

Additional context

No response

@davetapley davetapley added Documentation 📗 Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling Question labels Sep 12, 2024
@Pierre-Sassoulas Pierre-Sassoulas removed the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Sep 12, 2024
@Pierre-Sassoulas
Copy link
Member

Yeap, that would be great. (Related to #9507 also, if you have ideas about how to fix this too)

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

No branches or pull requests

2 participants