From 5f6d7d3c8857b267bd64e73e9efd9b66b4eea0e8 Mon Sep 17 00:00:00 2001 From: Autumn60 Date: Sun, 28 Jul 2024 13:45:26 +0900 Subject: [PATCH] add spell-check ci Signed-off-by: Autumn60 --- .cspell.json | 47 +++++++++++++++++++ .../workflows/spell-check-differential.yaml | 18 +++++++ .github/workflows/spell-check.yaml | 20 ++++++++ 3 files changed, 85 insertions(+) create mode 100644 .cspell.json create mode 100644 .github/workflows/spell-check-differential.yaml create mode 100644 .github/workflows/spell-check.yaml diff --git a/.cspell.json b/.cspell.json new file mode 100644 index 00000000..fa91ea5d --- /dev/null +++ b/.cspell.json @@ -0,0 +1,47 @@ +{ + "ignorePaths": [ + "**/*.cspell.json", + "**/*.dae", + "**/*.html", + "**/*.mp3", + "**/*.mp4", + "**/*.pcd", + "**/*.stl", + "**/*.svg", + "**/*.wav", + "**/*.zip", + "**/.git/**", + "**/.gitignore", + "**/.vscode/**", + "**/build/**", + "**/CHANGELOG.rst", + "**/CPPLINT.cfg", + "**/Doxyfile", + "**/install/**", + "**/log/**", + "**/package-lock.json" + ], + "ignoreRegExpList": [ + "\\[.*/.*\\]\\(https://github.com", + "Copyright .*[0-9]{4}.+", + "github.com[/:][\\w._\\-]+(/[\\w._\\-]+)?", + "ppa:.+/[^\\s]+", + "@[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}" + ], + "overrides": [ + { + "filename": "**/*.yaml", + "ignoreRegExpList": ["author: .+$", "git_email: .+$", "git_user: .+$", "uses: .+$"] + }, + { + "filename": "**/package.xml", + "ignoreRegExpList": ["", ""] + }, + { + "filename": "**/{*.cpp,*.hpp}", + "ignoreRegExpList": ["@author .*$", "[\\@]tparam", "\\author .*$", "Author(s)?( )?: .*$"] + } + ], + "words": [ + ] +} diff --git a/.github/workflows/spell-check-differential.yaml b/.github/workflows/spell-check-differential.yaml new file mode 100644 index 00000000..96dad7c4 --- /dev/null +++ b/.github/workflows/spell-check-differential.yaml @@ -0,0 +1,18 @@ +name: spell-check-differential + +on: + pull_request: + branches: [main] + +jobs: + spell-check-differential: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Run spell check + uses: streetsidesoftware/cspell-action@v6 + with: + config: .cspell.json + incremental_files_only: true diff --git a/.github/workflows/spell-check.yaml b/.github/workflows/spell-check.yaml new file mode 100644 index 00000000..38046097 --- /dev/null +++ b/.github/workflows/spell-check.yaml @@ -0,0 +1,20 @@ +name: spell-check + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + spell-check: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Run spell check + uses: streetsidesoftware/cspell-action@v6 + with: + config: .cspell.json + incremental_files_only: false