From 113ed54e9d03785cb4df51a6fb654ef9d3a29909 Mon Sep 17 00:00:00 2001 From: Nickolay Olshevsky Date: Wed, 18 Sep 2024 12:03:15 +0300 Subject: [PATCH] Add typos check action and config. --- .github/workflows/lint.yml | 11 ++++++++++- _typos.toml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 _typos.toml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ffa1b1c904..5fce5a8d62 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,6 +40,16 @@ jobs: scandir: './ci' env: SHELLCHECK_OPTS: -x + typos: + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: true + - uses: crate-ci/typos@master + version-cmake-up-to-date: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'skip ci')" @@ -74,4 +84,3 @@ jobs: set -eux pwd [[ "$(cat ./rnp/version.txt)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; - diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 0000000000..78fce637b9 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,32 @@ +[default] +extend-ignore-identifiers-re = [ + ".*fpr.*", + ".*FPR.*", + ".*[0-9a-fA-F]{4,}", +] + +[default.extend-identifiers] +validate_desig_revokes = "validate_desig_revokes" +desig_rev = "desig_rev" +Nominet = "Nominet" +NOMINET = "NOMINET" +PNGs = "PNGs" +FOF = "FOF" +EDE3 = "EDE3" +ede3 = "ede3" +ffrom = "ffrom" +clen = "clen" +__THW_INTEL__ = "__THW_INTEL__" + +[default.extend-words] +MERCHANTIBILITY = "MERCHANTIBILITY" +FOF = "FOF" +FO = "FO" +claus = "claus" +desig = "desig" + +[files] +extend-exclude = [ + "src/tests/data/**", + "src/libsexpp/**" +] \ No newline at end of file