From 2b367795fc0f74624bb6c1ec58f406807c7b1b3f Mon Sep 17 00:00:00 2001 From: Joscha Feth Date: Wed, 25 Sep 2024 23:48:58 +0100 Subject: [PATCH] chore: add typos --- .envrc | 1 + .github/workflows/lints.yaml | 16 ++++++ .typos.toml | 95 ++++++++++++++++++++++++++++++++++++ flake.nix | 1 + 4 files changed, 113 insertions(+) create mode 100644 .github/workflows/lints.yaml create mode 100644 .typos.toml diff --git a/.envrc b/.envrc index b85b26d148b6d..ae0acc35a3eb2 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,2 @@ +export DIRENV_WARN_TIMEOUT=5m has nix && use flake diff --git a/.github/workflows/lints.yaml b/.github/workflows/lints.yaml new file mode 100644 index 0000000000000..04cd2431c985d --- /dev/null +++ b/.github/workflows/lints.yaml @@ -0,0 +1,16 @@ +name: Linting + +on: + push: + branches: + pull_request: + branches: + +jobs: + build: + name: Lints + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check spelling + uses: crate-ci/typos@master diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000000000..4979e58f2a4fe --- /dev/null +++ b/.typos.toml @@ -0,0 +1,95 @@ +[default] +extend-ignore-identifiers-re = [ + # java packages + "[a-z][a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)+[0-9a-zA-Z_]+", + # short commit hashes + "\\b[0-9a-f]{5,40}\\b" +] + +[default.extend-identifiers] +UE4 = "UE4" +cpp-ue4 = "cpp-ue4" +DEACTIVE = "DEACTIVATE" +xdescribe = "xdescribe" +inout = "inout" +woo-noo = "woo-noo" + + +[default.extend-words] +testng = "testng" +robocorp = "robocorp" +freee = "freee" +verticle = "verticle" +commitish = "commitish" +cpp-ue4 = "cpp-ue4" +woo-noo = "woo-noo" +inout = "inout" +UE = "UE" +BA = "BA" +ND = "ND" +ist = "ist" +EDE = "EDE" +dota = "dota" +ser = "ser" +creater = "create" +claus = "claus" +2nd_place_medal = "2nd_place_medal" +fo = "fo" +Laso = "Laso" +patten = "pattern" +DEFFERED = "DEFERRED" +add-ons = "add-ons" +Paket = "Paket" +MKE = "MKE" +Informations = "Informations" +mvNiOIS = "mvNiOIS" +thess = "these" +Interal = "Internal" +sie = "sie" +NWE = "NWE" +womens = "womens" +noo = "noo" + +[files] +extend-exclude = [ + "samples/documentation/**/*.html", + "samples/documentation/**/*.js", + "modules/openapi-generator-online/src/main/resources/static/**/*", + "modules/openapi-generator/src/main/resources/htmlDocs2/**/*", + "modules/openapi-generator/src/main/resources/openapi-static/assets/js/*.js", + "modules/openapi-generator/src/test/resources/3_0/jetbrains/github.json", + # contains a fixed typo + "docs/3.0.0-release-note.md" +] + + +[type.pbxproj] +extend-glob = [ + "**/*.pbxproj" +] +check-file = false + +[type.swift] +extend-glob = [ + "*.swift", + "docs/generators/swift*.md", + "docs/generators/swift5.md", + "docs/generators/swift*/**/*.md", + "samples/client/**/swift*/**/*.md", + "samples/client/petstore/swift6/**/*.md" +] +# check-file = false + +[type.swift.extend-words] + inout = "inout" + +# [type.java.extend-identifiers] +# com.fasterxml.jackson.databind.ser = "com.fasterxml.jackson.databind.ser" + +[type.cert] +extend-glob = ["*.cert"] +check-file = false + +[type.http] +extend-glob = ["*.http"] +check-file = false \ No newline at end of file diff --git a/flake.nix b/flake.nix index dcafe3056c8c9..a3de728ec4175 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,7 @@ buildInputs = with pkgs;[ jdk11 maven + typos ]; }; }