diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000000..2ea390ce8b --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +exclude-file = .codespellx +ignore-words-list = "FPT,FTP,fpt,ftp" diff --git a/.codespellx b/.codespellx new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.conform.yaml b/.conform.yaml new file mode 100644 index 0000000000..f96e4e0940 --- /dev/null +++ b/.conform.yaml @@ -0,0 +1,16 @@ +--- +policies: + - type: commit + spec: + header: + length: 80 + imperative: false + invalidLastCharacters: . + body: + required: false + dco: true + gpg: + required: true + spellcheck: + locale: US + maximumOfOneCommit: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..f0464484cb --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,46 @@ +--- +default_stages: [pre-commit] + +default_install_hook_types: [pre-commit, commit-msg] + +ci: + autoupdate_commit_msg: 'pre-commit: autoupdate hooks' + autofix_prs: false + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-added-large-files + - id: check-merge-conflict + - id: check-symlinks + - id: detect-private-key + # Consider re-enabling (a lot of coreboot code is affected, but with + # vendorcode excluded is much less) + # - id: end-of-file-fixer + # exclude: "src/vendorcode" + # - id: trailing-whitespace + # exclude: "src/vendorcode" + - id: mixed-line-ending + + - repo: https://github.com/talos-systems/conform + rev: v0.1.0-alpha.27 + hooks: + - id: conform + stages: + - commit-msg + + # Consider re-enabling (a lot of coreboot code is affected, but with + # vendorcode excluded it is much less) + # - repo: https://github.com/codespell-project/codespell + # rev: v2.2.5 + # hooks: + # - id: codespell + + - repo: local + hooks: + - id: coreboot_lint + name: Runs coreboot lint-stable linter checks + entry: util/lint/lint lint-stable + language: script + types: [file]