From c931c100e20bf820088287a83dc34e71ddb5e9f3 Mon Sep 17 00:00:00 2001 From: amdahliu Date: Thu, 26 Oct 2023 10:17:43 +0800 Subject: [PATCH 1/2] workflow: add false-positives for typo check --- .github/typos.toml | 6 ++++++ .github/workflows/prc.yml | 3 +++ oteltrpc/{README_cn.md => README.zh_CN.md} | 0 3 files changed, 9 insertions(+) create mode 100644 .github/typos.toml rename oteltrpc/{README_cn.md => README.zh_CN.md} (100%) diff --git a/.github/typos.toml b/.github/typos.toml new file mode 100644 index 0000000..ef41379 --- /dev/null +++ b/.github/typos.toml @@ -0,0 +1,6 @@ +[default.extend-words] +# Don't correct the surname "Teh" +teh = "teh" + +[files] +extend-exclude = ["go.mod", "go.sum"] \ No newline at end of file diff --git a/.github/workflows/prc.yml b/.github/workflows/prc.yml index 884680d..4ae2a09 100644 --- a/.github/workflows/prc.yml +++ b/.github/workflows/prc.yml @@ -47,6 +47,9 @@ jobs: - uses: actions/checkout@v3 - name: typos uses: crate-ci/typos@master + with: + # https://github.com/crate-ci/typos#false-positives + config: ./.github/typos.toml go-apidiff: if: github.event_name == 'pull_request' runs-on: ubuntu-latest diff --git a/oteltrpc/README_cn.md b/oteltrpc/README.zh_CN.md similarity index 100% rename from oteltrpc/README_cn.md rename to oteltrpc/README.zh_CN.md From c9171c55c3b4a59818c55659c700c4b4e878edd2 Mon Sep 17 00:00:00 2001 From: amdahliu Date: Thu, 26 Oct 2023 10:26:38 +0800 Subject: [PATCH 2/2] ignore go test file --- .github/typos.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/typos.toml b/.github/typos.toml index ef41379..9ceeb7b 100644 --- a/.github/typos.toml +++ b/.github/typos.toml @@ -1,6 +1,6 @@ -[default.extend-words] -# Don't correct the surname "Teh" -teh = "teh" +[type.po] +extend-glob = ["*_test.go"] +check-file = false [files] extend-exclude = ["go.mod", "go.sum"] \ No newline at end of file