mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
f515669ce3
Add `.codespellrc` to the GitHub labeler Can now run codespell from the command line standalone and it will use our standard config file. Running codespell with pre-commit will also use this config. Useful when regenerating the ignored words file on the command line. https://github.com/codespell-project/codespell?tab=readme-ov-file#using-a-config-file https://github.com/codespell-project/codespell?tab=readme-ov-file#pre-commit-hook
133 lines
4.2 KiB
YAML
133 lines
4.2 KiB
YAML
---
|
|
# https://pre-commit.com/
|
|
default_stages: [pre-commit, pre-push]
|
|
default_language_version:
|
|
# force all unspecified Python hooks to run python3
|
|
python: python3
|
|
# force all unspecified Node hooks to run Node.js v22.15.0 LTS
|
|
node: 22.15.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 .
|
|
files: \.(json|md|ya?ml)$
|
|
language: node
|
|
additional_dependencies: ["prettier@3.5.3"]
|
|
- repo: https://github.com/gitleaks/gitleaks
|
|
rev: v8.25.1
|
|
hooks:
|
|
- id: gitleaks
|
|
name: run gitleaks
|
|
description: detect hardcoded secrets with gitleaks
|
|
- repo: https://github.com/shssoichiro/oxipng
|
|
rev: v9.1.5
|
|
hooks:
|
|
- id: oxipng
|
|
name: run oxipng
|
|
description: use lossless compression to optimize PNG files
|
|
args: ["-o", "4", "--strip", "safe", "--alpha"]
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v5.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/jumanjihouse/pre-commit-hooks
|
|
rev: 3.0.0
|
|
hooks:
|
|
- id: script-must-not-have-extension
|
|
name: run script-must-not-have-extension
|
|
description: local policy is to exclude extension from all shell files
|
|
types: [shell]
|
|
- repo: https://github.com/igorshubovych/markdownlint-cli
|
|
rev: v0.44.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/shellcheck-py/shellcheck-py
|
|
rev: v0.10.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.0
|
|
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$
|