diff --git a/.codespell/ignore-words.txt b/.codespell/ignore-words.txt new file mode 100644 index 0000000000..f06e3b0958 --- /dev/null +++ b/.codespell/ignore-words.txt @@ -0,0 +1,4 @@ +cna +ege +noteable +statics diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000000..3a1e19b2d5 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,5 @@ +[codespell] +skip = ./_build,./.git,./venv,core-developers/developers.csv,include/release-cycle.json +ignore-words = .codespell/ignore-words.txt +# exclude-file = .codespell/exclude-file.txt +# uri-ignore-words-list = daa,ist,searchin,theses diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5c9caf026f..cbbe84ab81 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,7 +3,7 @@ name: Lint on: [push, pull_request, workflow_dispatch] jobs: - lint: + pre-commit: runs-on: ubuntu-latest timeout-minutes: 10 @@ -13,3 +13,12 @@ jobs: with: python-version: "3.x" - uses: pre-commit/action@v3.0.0 + + spelling: + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v4 + - name: Check spelling + uses: codespell-project/actions-codespell@v2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ae27fd1f23..7458ccf2d6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,6 +18,8 @@ repos: - id: check-yaml - id: debug-statements - id: end-of-file-fixer + - id: file-contents-sorter + files: ^\.codespell/ignore-words\.txt$ - id: trailing-whitespace - repo: https://github.com/sphinx-contrib/sphinx-lint @@ -26,6 +28,11 @@ repos: - id: sphinx-lint args: [--enable=default-role] + - repo: https://github.com/codespell-project/codespell + rev: v2.3.0 + hooks: + - id: codespell + - repo: meta hooks: - id: check-hooks-apply diff --git a/development-tools/coverity.rst b/development-tools/coverity.rst index 7c165a3126..71f44dc5ac 100644 --- a/development-tools/coverity.rst +++ b/development-tools/coverity.rst @@ -109,7 +109,7 @@ Positive issues You should always create an issue unless it's really a trivial case. Please add the full url to the ticket under *Ext. Reference* and add the CID -(Coverity ID) to both the ticket and the checkin message. It makes it much +(Coverity ID) to both the ticket and the commit message. It makes it much easier to understand the relation between tickets, fixes and Coverity issues.