Skip to content

Commit

Permalink
Update .pre-commit-config.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
yunks128 authored May 9, 2024
1 parent 40fe6dd commit 957d488
Showing 1 changed file with 10 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,44 @@ fail_fast: true # Stops running hooks after the first failure

repos: # List of repositories containing pre-commit hooks

# Pre-commit hooks from the pre-commit-hooks repository
# Language-Agnostic Hooks
- repo: https://github.com/pre-commit/pre-commit-hooks # Repository URL
rev: v4.5.0 # Version or commit hash to use
hooks: # List of hooks to be executed
- id: trailing-whitespace # Removes trailing whitespace from files
- id: end-of-file-fixer # Ensures that files end with a newline character
- id: check-yaml # Lints YAML files for syntax errors
- id: check-xml # Lints XML files for syntax errors
- id: check-json # Checks JSON files for parsable syntax
- id: check-added-large-files # Checks for large files added to the repository
args:
- --maxkb=50000 # Specifies the maximum allowed file size in kilobytes
- id: check-json # Checks JSON files for parsable syntax
- id: pretty-format-json # Formats JSON files according to a standard
args:
- --autofix # Automatically fixes formatting issues

# Language-Specific Hooks: Python
- repo: https://github.com/pre-commit/pre-commit-hooks # Repository URL
rev: v4.5.0 # Version or commit hash to use
hooks: # List of hooks to be executed
- id: requirements-txt-fixer # Sorts entries in requirements.txt alphabetically
- id: check-ast # Checks Python files for parse errors
- id: detect-private-key # Detects the presence of private keys in files
- id: detect-aws-credentials # Detects AWS credentials in the AWS CLI credentials file
args:
- --allow-missing-credentials # Allows missing AWS credentials
- id: check-toml # Lints TOML files for syntax errors

# Pre-commit hooks from the markdownlint-cli repository
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: "v0.39.0"
hooks:
- id: markdownlint # Lints Markdown files according to specified configuration
args: ["--config", ".markdownlintrc", "--ignore", "CHANGELOG.md"]

# Pre-commit hooks from the isort repository
# Language-Specific Hooks: Python
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort # Sorts Python import statements

# Pre-commit hooks from the black-pre-commit-mirror repository
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.1.1
hooks:
- id: black # Formats Python code using the Black formatter

# Pre-commit hooks from the ruff-pre-commit repository
# Language-Specific Hooks: Ruby
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
hooks:
- id: ruff # Runs Ruff, a Ruby static code analyzer

# Pre-commit hooks from the bandit repository
# General Security Checks
- repo: https://github.com/PyCQA/bandit
rev: "1.7.7"
hooks:
Expand Down

0 comments on commit 957d488

Please sign in to comment.