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

Feature: Replacements for pre-commit rules #11380

Open
glensc opened this issue May 12, 2024 · 4 comments
Open

Feature: Replacements for pre-commit rules #11380

glensc opened this issue May 12, 2024 · 4 comments

Comments

@glensc
Copy link

glensc commented May 12, 2024

pre-commit is rather slow, so I'm looking for to replace this all:

  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.5.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-yaml
      - id: check-json
      - id: check-added-large-files
      - id: fix-byte-order-marker
      - id: check-builtin-literals
      - id: check-case-conflict
      - id: check-executables-have-shebangs
      - id: check-shebang-scripts-are-executable
      - id: check-merge-conflict
      - id: check-vcs-permalinks
      - id: destroyed-symlinks
      - id: mixed-line-ending

Source: https://github.com/Taxel/PlexTraktSync/blob/ab773cc0b3dc1c3c7efbf8509e5627d1dba1d3dd/.pre-commit-config.yaml#L5-L21

@trim21
Copy link

trim21 commented May 13, 2024

Don't think ruff should support this excpet check-builtin-literals...

@glensc
Copy link
Author

glensc commented May 15, 2024

Yes, these checks are specific to git commits, i.e do not belong to python linter:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: destroyed-symlinks

also, these checks are for other language, so useful in git commit hook, but not useful in python linter
- id: check-yaml
- id: check-json

not sure of
- id: fix-byte-order-marker

@worldmind
Copy link

A bit related ticket #10227

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

No branches or pull requests

3 participants