--- # https://pre-commit.com/ default_stages: [pre-commit, pre-push] default_language_version: python: python3 node: 22.19.0 minimum_pre_commit_version: "3.2.0" exclude: "^tools/lrama/" repos: - repo: meta hooks: - id: identity name: run identity description: check your identity - id: check-hooks-apply name: run check-hooks-apply description: check hooks apply to the repository - repo: local hooks: - id: prettier name: run prettier description: format files with prettier entry: prettier --write '**/*.json' '**/*.md' '**/*.yaml' '**/*.yml' files: \.(json|md|ya?ml)$ language: node additional_dependencies: ["prettier@3.6.2"] - repo: https://github.com/gitleaks/gitleaks rev: v8.28.0 hooks: - id: gitleaks name: run gitleaks description: detect hardcoded secrets with gitleaks - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: check-added-large-files - id: check-case-conflict - id: check-executables-have-shebangs exclude: ^test/t/lang\.rb$ - id: check-illegal-windows-names - id: pretty-format-json args: [--autofix, --no-sort-keys] - id: check-json - id: check-merge-conflict - id: check-shebang-scripts-are-executable - id: check-vcs-permalinks - id: check-yaml - id: destroyed-symlinks - id: detect-aws-credentials args: [--allow-missing-credentials] - id: detect-private-key - id: end-of-file-fixer - id: file-contents-sorter args: [--unique] files: ^\.github/linters/codespell\.txt$ - id: fix-byte-order-marker - id: forbid-submodules - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/Lucas-C/pre-commit-hooks rev: v1.5.5 hooks: - id: forbid-tabs name: run no-tabs checker description: check the codebase for tabs exclude: Makefile$ - id: remove-tabs name: run tabs remover description: find and convert tabs to spaces args: [--whitespaces-count, "2"] exclude: Makefile$ - repo: https://github.com/rhysd/actionlint rev: v1.7.7 hooks: - id: actionlint name: run actionlint description: lint GitHub Actions workflow files - repo: https://github.com/codespell-project/codespell rev: v2.4.1 hooks: - id: codespell name: run codespell description: check spelling with codespell - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.45.0 hooks: - id: markdownlint name: run markdownlint description: checks the style of Markdown files args: [--config=.github/linters/.markdown-lint.yml] types: [markdown] files: \.md$ - repo: https://github.com/tcort/markdown-link-check rev: v3.13.7 hooks: - id: markdown-link-check name: run markdown-link-check description: checks hyperlinks in Markdown files args: [--config=.github/linters/mlc_config.json, -q] types: [markdown] files: \.md$ - repo: https://github.com/rubocop/rubocop rev: v1.80.2 hooks: - id: rubocop name: run rubocop description: RuboCop is a Ruby code style checker (linter) and formatter based on the community-driven Ruby Style Guide exclude: ^test/t/syntax\.rb$ args: [--config=.github/linters/.rubocop.yml] - repo: https://github.com/shellcheck-py/shellcheck-py rev: v0.11.0.1 hooks: - id: shellcheck name: run shellcheck description: check shell scripts with a static analysis tool - repo: https://github.com/adrienverge/yamllint rev: v1.37.1 hooks: - id: yamllint name: run yamllint description: check YAML files with yamllint args: [--strict, -c=.github/linters/.yaml-lint.yml] types: [yaml] files: \.ya?ml$