From dc102e270b7bd499ae82b99fdee42fe6a75b7029 Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Sat, 14 Oct 2023 11:01:27 -0500 Subject: [PATCH 01/43] Try using typos in CI --- .github/workflows/SpellCheck.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/SpellCheck.yml diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml new file mode 100644 index 0000000000000..e5610862bf1e5 --- /dev/null +++ b/.github/workflows/SpellCheck.yml @@ -0,0 +1,15 @@ +name: Spell Check + +permissions: {} + +on: [pull_request] + +jobs: + typos-check: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v4 + - name: Check spelling + uses: crate-ci/typos@master From fe586bba2fdad1edd658a153e8716d58ac371ac1 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sat, 14 Oct 2023 12:38:04 -0400 Subject: [PATCH 02/43] Apply suggestions from code review --- .github/workflows/SpellCheck.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index e5610862bf1e5..70d14f0c4dbe1 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -11,5 +11,7 @@ jobs: steps: - name: Checkout Actions Repository uses: actions/checkout@v4 + with: + persist-credentials: false - name: Check spelling uses: crate-ci/typos@master From 83926ab01f56b1b7f3e1ecbfe0986ecc41140ee0 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sat, 14 Oct 2023 12:38:51 -0400 Subject: [PATCH 03/43] Apply suggestions from code review --- .github/workflows/SpellCheck.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 70d14f0c4dbe1..c75ca9edf14b2 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -1,6 +1,7 @@ name: Spell Check -permissions: {} +permissions: + contents: read on: [pull_request] From 18e15229895f2c9c6333fee9317090cbe90ab96d Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sat, 14 Oct 2023 12:40:40 -0400 Subject: [PATCH 04/43] Apply suggestions from code review --- .github/workflows/SpellCheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index c75ca9edf14b2..0dec4f54ff279 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -10,7 +10,7 @@ jobs: name: Spell Check with Typos runs-on: ubuntu-latest steps: - - name: Checkout Actions Repository + - name: Checkout the JuliaLang/julia repository uses: actions/checkout@v4 with: persist-credentials: false From 2c7b9b46224d3be759e13eaa8cde5e849aba143d Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sat, 14 Oct 2023 13:13:35 -0400 Subject: [PATCH 05/43] Set a 5-minute timeout (Apply suggestions from code review) --- .github/workflows/SpellCheck.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 0dec4f54ff279..341d5f52f8734 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -9,6 +9,7 @@ jobs: typos-check: name: Spell Check with Typos runs-on: ubuntu-latest + timeout-minutes: 5 steps: - name: Checkout the JuliaLang/julia repository uses: actions/checkout@v4 From 4e25d37afd0bda8ef49fccbccffdd42c687cc354 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sat, 14 Oct 2023 13:25:04 -0400 Subject: [PATCH 06/43] Switch back to `permissions: {}` (Apply suggestions from code review) --- .github/workflows/SpellCheck.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 341d5f52f8734..3325a113015c9 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -1,7 +1,6 @@ name: Spell Check -permissions: - contents: read +permissions: {} on: [pull_request] From f15c6ae7fa2ec5ec7e9ef0ee335b5350e905a94b Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Sat, 14 Oct 2023 18:03:48 -0500 Subject: [PATCH 07/43] Try a hint on failure --- .github/workflows/SpellCheck.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 3325a113015c9..42f0573f7089e 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -16,3 +16,6 @@ jobs: persist-credentials: false - name: Check spelling uses: crate-ci/typos@master + - name: False positive hint + if: failure() + run: echo "If this is not a typo, add it to the [default.extend-identifiers] section of typos.toml" From e1e17a2be2cf028ba43c457ab4984df3f51bd0d0 Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Sat, 14 Oct 2023 18:07:28 -0500 Subject: [PATCH 08/43] Move the hint to a more prominent location --- .github/workflows/SpellCheck.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 42f0573f7089e..8b2e853636f41 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -6,7 +6,7 @@ on: [pull_request] jobs: typos-check: - name: Spell Check with Typos + name: add false positives to typos.toml runs-on: ubuntu-latest timeout-minutes: 5 steps: @@ -14,8 +14,5 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false - - name: Check spelling + - name: Check spelling wit typos uses: crate-ci/typos@master - - name: False positive hint - if: failure() - run: echo "If this is not a typo, add it to the [default.extend-identifiers] section of typos.toml" From 7a0c98cde057e9ff4422c0e255af7a14075097c3 Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Sat, 14 Oct 2023 18:08:09 -0500 Subject: [PATCH 09/43] Add parentheses --- .github/workflows/SpellCheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 8b2e853636f41..d491177668157 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -6,7 +6,7 @@ on: [pull_request] jobs: typos-check: - name: add false positives to typos.toml + name: (add false positives to typos.toml) runs-on: ubuntu-latest timeout-minutes: 5 steps: From 5306441b70013e9cc22f7d9d0bf43043febf965f Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Sat, 14 Oct 2023 18:28:53 -0500 Subject: [PATCH 10/43] Add draft typos.toml --- typos.toml | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 typos.toml diff --git a/typos.toml b/typos.toml new file mode 100644 index 0000000000000..7f85dda0aeab0 --- /dev/null +++ b/typos.toml @@ -0,0 +1,96 @@ +# Hello and Welcome to typos.toml! + +## Policy +# tldr: Don't let CI bully you. Use whatever varaible names you want. +# +# The spell check CI feature exists to help detect accidental typos, not to constrain the +# language we use in this repo. If you want to use a word or a variable name or somesuch +# that the CI check is not happy with, go right ahead, just make sure to add the appropriate +# entry to this file to tell the CI check that you didn't make a mistake. As a reviewier, if +# you think that a variable name is bad, go right ahead and tell the author that, just don't +# cite the CI check as a reason, that's not what the check is for. + +## How to +# tldr: Add the whole identifier right below [default.extend-identifiers] +# +# There are two magor sections in this file, [default.extend-identifiers] (near the top) and +# [default.extend-words] (near the bottom). If the false positive is a full identifier like +# `mrs_claus` or `breal`, add it to [default.extend-identifiers] and that specific +# identifier will no longer be flagged as a typo. If, on the other hand, it is a word that +# appeasrs inside multiple a multi-word identifiers, like `ser` which is used in +# `jl_lookup_ser_tag`, `ser_tag`, `ser_version`, etc. then insrted of adding each of those +# identifiers individually, simply add it to the [default.extend-words] section. Identifiers +# are case sensitive and words are not. + +[default.extend-identifiers] +mrs_claus = "mrs_claus" +womens = "womens" +breal = "breal" +Breal = "Breal" +Numer = "Numer" +splitted = "splitted" +affinitized = "affinitized" +key_smove = "key_smove" +readed_zero = "readed_zero" +check_inconsistentcy = "check_inconsistentcy" +L_OP_CALLL = "L_OP_CALLL" +OP_CALLL = "OP_CALLL" + +# strings in test directories +Facilisi = "Facilisi" +vailable = "vailable" + +# typos that are programmatically observable +supress_output = "supress_output" +hashs_seed = "hashs_seed" + +[default.extend-words] +ba = "ba" +egal = "egal" +parm = "parm" +modul = "modul" +nd = "nd" +strat = "strat" +WRONLY = "WRONLY" +thisy = "thisy" +vally = "vally" +Ot = "Ot" +clos = "clos" +applys = "applys" +findn = "findn" +mis = "mis" +seh = "seh" +ue = "ue" +Missings = "Missings" +SOM = "SOM" +sais = "sais" +Merly = "Merly" +Filetimes = "Filetimes" +HSA = "HSA" +Strategems = "Strategems" +anumber = "anumber" +uupper = "uupper" +shttp = "shttp" +ser = "ser" +somes = "somes" +sav = "sav" +egals = "egals" +OLT = "OLT" +eyt = "eyt" +matc = "matc" +nam = "nam" +alls = "alls" +noe = "noe" + +# strings in tests directories +fo = "fo" +Uest = "Uest" +Dows = "Dows" +aquire = "aquire" + +# typos that are programmatically observable +compileable = "compileable" +overlayed = "overlayed" + +[default] +extend-ignore-identifiers-re = ["^[a-zA-Z][a-zA-Z]?[a-zA-Z]?[a-zA-Z]?$"] From bc36c535f3b7d164ae47e96e8301cec02b172fea Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Sat, 14 Oct 2023 18:32:07 -0500 Subject: [PATCH 11/43] Irony at its peak --- .github/workflows/SpellCheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index d491177668157..ee0aa5ff3ba91 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -14,5 +14,5 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false - - name: Check spelling wit typos + - name: Check spelling with typos uses: crate-ci/typos@master From 03334fa9323cf27b52d115fc2cc0ada1c5ecdbe3 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 08:48:57 -0500 Subject: [PATCH 12/43] add typo --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index e904b3b8d6770..d75f0a3fc76ca 100644 --- a/README.md +++ b/README.md @@ -161,3 +161,7 @@ For users who prefer IDEs, we recommend using VS Code with the For notebook users, [Jupyter](https://jupyter.org/) notebook support is available through the [IJulia](https://github.com/JuliaLang/IJulia.jl) package, and the [Pluto.jl](https://github.com/fonsp/Pluto.jl) package provides Pluto notebooks. + +This is a typo: futher, staticly + +Teh rest are quite simlpe. From 5b18d98d60ab19722fd5c48a199fc317bb984c63 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 09:09:51 -0500 Subject: [PATCH 13/43] use home-rolled typos --- .github/workflows/SpellCheck.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index ee0aa5ff3ba91..1371b7e7f6f01 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -15,4 +15,18 @@ jobs: with: persist-credentials: false - name: Check spelling with typos - uses: crate-ci/typos@master + #uses: crate-ci/typos@master + run: | + set -o pipefail + mkdir -p "${{ runner.temp }}/typos" + RELEASE_ASSET_URL="$( + gh api /repos/crate-ci/typos/releases/latest \ + --jq '."assets"[] | select(."name" | test("^typos-.+-x86_64-unknown-linux-musl\\.tar\\.gz$")) | ."browser_download_url"' + )" + wget --secure-protocol=TLSv1_3 --max-redirect=1 --retry-on-host-error --retry-connrefused --tries=3 \ + --quiet --output-document=- "${RELEASE_ASSET_URL}" \ + | tar -xz -C "${{ runner.temp }}/typos" ./typos + "${{ runner.temp }}/typos/typos" --version + git diff-index --name-only --diff-filter=d -z ${{ github.base_ref }} \ + | xargs -0"${{ runner.temp }}/typos/typos" --format json \ + | jq --raw-output '"::warning file=\(.path),line=\(.line_num),col=\(.byte_offset)::perhaps \"\(.typo)\" should be \"" + (.corrections // [] | join("\" or \"") + "\".")' \ No newline at end of file From e426c1a9c4e984b9a8a2425af994557e449cbd96 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 09:11:21 -0500 Subject: [PATCH 14/43] give access to github.token (still with no permissions?) --- .github/workflows/SpellCheck.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 1371b7e7f6f01..6e75c57a1d020 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -16,6 +16,8 @@ jobs: persist-credentials: false - name: Check spelling with typos #uses: crate-ci/typos@master + env: + GH_TOKEN: "${{ github.token }}" run: | set -o pipefail mkdir -p "${{ runner.temp }}/typos" From 45a4651c410d494046a6bff92060174393b9aea7 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 09:18:37 -0500 Subject: [PATCH 15/43] also fetch base ref --- .github/workflows/SpellCheck.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 6e75c57a1d020..6fc22c8540d3a 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -14,10 +14,11 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false + run: git fetch --depth=1 origin ${{ github.base_ref }} - name: Check spelling with typos #uses: crate-ci/typos@master env: - GH_TOKEN: "${{ github.token }}" + GH_TOKEN: "${{ github.token }}" run: | set -o pipefail mkdir -p "${{ runner.temp }}/typos" From 0f7e924550a46f17066d88fef3fc86b01c3fdbe4 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 09:20:52 -0500 Subject: [PATCH 16/43] move fetch to typos step --- .github/workflows/SpellCheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 6fc22c8540d3a..dade4e66cab37 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -14,12 +14,12 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false - run: git fetch --depth=1 origin ${{ github.base_ref }} - name: Check spelling with typos #uses: crate-ci/typos@master env: GH_TOKEN: "${{ github.token }}" run: | + git fetch --depth=1 origin ${{ github.base_ref }} set -o pipefail mkdir -p "${{ runner.temp }}/typos" RELEASE_ASSET_URL="$( From d29296842d831e8a95762426707973d1f67bb479 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 09:27:04 -0500 Subject: [PATCH 17/43] debug --- .github/workflows/SpellCheck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index dade4e66cab37..a22a81d887487 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -30,6 +30,6 @@ jobs: --quiet --output-document=- "${RELEASE_ASSET_URL}" \ | tar -xz -C "${{ runner.temp }}/typos" ./typos "${{ runner.temp }}/typos/typos" --version - git diff-index --name-only --diff-filter=d -z ${{ github.base_ref }} \ - | xargs -0"${{ runner.temp }}/typos/typos" --format json \ + git diff-index --name-only --diff-filter=d -z FETCH_HEAD \ + | xargs -0 "${{ runner.temp }}/typos/typos" --format json \ | jq --raw-output '"::warning file=\(.path),line=\(.line_num),col=\(.byte_offset)::perhaps \"\(.typo)\" should be \"" + (.corrections // [] | join("\" or \"") + "\".")' \ No newline at end of file From 0a07f5917764995bbdbc7df0ae4324e11fa8a308 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 09:43:10 -0500 Subject: [PATCH 18/43] try to remove the list of false positives --- typos.toml | 96 ------------------------------------------------------ 1 file changed, 96 deletions(-) delete mode 100644 typos.toml diff --git a/typos.toml b/typos.toml deleted file mode 100644 index 7f85dda0aeab0..0000000000000 --- a/typos.toml +++ /dev/null @@ -1,96 +0,0 @@ -# Hello and Welcome to typos.toml! - -## Policy -# tldr: Don't let CI bully you. Use whatever varaible names you want. -# -# The spell check CI feature exists to help detect accidental typos, not to constrain the -# language we use in this repo. If you want to use a word or a variable name or somesuch -# that the CI check is not happy with, go right ahead, just make sure to add the appropriate -# entry to this file to tell the CI check that you didn't make a mistake. As a reviewier, if -# you think that a variable name is bad, go right ahead and tell the author that, just don't -# cite the CI check as a reason, that's not what the check is for. - -## How to -# tldr: Add the whole identifier right below [default.extend-identifiers] -# -# There are two magor sections in this file, [default.extend-identifiers] (near the top) and -# [default.extend-words] (near the bottom). If the false positive is a full identifier like -# `mrs_claus` or `breal`, add it to [default.extend-identifiers] and that specific -# identifier will no longer be flagged as a typo. If, on the other hand, it is a word that -# appeasrs inside multiple a multi-word identifiers, like `ser` which is used in -# `jl_lookup_ser_tag`, `ser_tag`, `ser_version`, etc. then insrted of adding each of those -# identifiers individually, simply add it to the [default.extend-words] section. Identifiers -# are case sensitive and words are not. - -[default.extend-identifiers] -mrs_claus = "mrs_claus" -womens = "womens" -breal = "breal" -Breal = "Breal" -Numer = "Numer" -splitted = "splitted" -affinitized = "affinitized" -key_smove = "key_smove" -readed_zero = "readed_zero" -check_inconsistentcy = "check_inconsistentcy" -L_OP_CALLL = "L_OP_CALLL" -OP_CALLL = "OP_CALLL" - -# strings in test directories -Facilisi = "Facilisi" -vailable = "vailable" - -# typos that are programmatically observable -supress_output = "supress_output" -hashs_seed = "hashs_seed" - -[default.extend-words] -ba = "ba" -egal = "egal" -parm = "parm" -modul = "modul" -nd = "nd" -strat = "strat" -WRONLY = "WRONLY" -thisy = "thisy" -vally = "vally" -Ot = "Ot" -clos = "clos" -applys = "applys" -findn = "findn" -mis = "mis" -seh = "seh" -ue = "ue" -Missings = "Missings" -SOM = "SOM" -sais = "sais" -Merly = "Merly" -Filetimes = "Filetimes" -HSA = "HSA" -Strategems = "Strategems" -anumber = "anumber" -uupper = "uupper" -shttp = "shttp" -ser = "ser" -somes = "somes" -sav = "sav" -egals = "egals" -OLT = "OLT" -eyt = "eyt" -matc = "matc" -nam = "nam" -alls = "alls" -noe = "noe" - -# strings in tests directories -fo = "fo" -Uest = "Uest" -Dows = "Dows" -aquire = "aquire" - -# typos that are programmatically observable -compileable = "compileable" -overlayed = "overlayed" - -[default] -extend-ignore-identifiers-re = ["^[a-zA-Z][a-zA-Z]?[a-zA-Z]?[a-zA-Z]?$"] From 5265529e98c71791b7aaa25ce0121551c95595b2 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 09:45:04 -0500 Subject: [PATCH 19/43] edit a file that already has false positives in it --- src/jlapi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jlapi.c b/src/jlapi.c index 29be3b9e6179c..365a1b2bc9119 100644 --- a/src/jlapi.c +++ b/src/jlapi.c @@ -4,6 +4,8 @@ jlapi.c miscellaneous functions for users of libjulia.so, to handle initialization and the style of use where julia is not in control most of the time. + + This is not a typo. */ #include "platform.h" From 23a2de6b2fb4fa06ab5841d10664852209f812d3 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:00:20 -0500 Subject: [PATCH 20/43] use set-diff (python instead of bash to get O(n)) --- .github/workflows/SpellCheck.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index a22a81d887487..82bdafe615900 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -30,6 +30,16 @@ jobs: --quiet --output-document=- "${RELEASE_ASSET_URL}" \ | tar -xz -C "${{ runner.temp }}/typos" ./typos "${{ runner.temp }}/typos/typos" --version - git diff-index --name-only --diff-filter=d -z FETCH_HEAD \ - | xargs -0 "${{ runner.temp }}/typos/typos" --format json \ - | jq --raw-output '"::warning file=\(.path),line=\(.line_num),col=\(.byte_offset)::perhaps \"\(.typo)\" should be \"" + (.corrections // [] | join("\" or \"") + "\".")' \ No newline at end of file + OLD_FILES=$(git diff-index --name-only --diff-filter=ad -z FETCH_HEAD) + NEW_FILES=$(git diff-index --name-only --diff-filter=d -d FETCH_HEAD) + NEW_TYPOS=$(echo -n $NEW_FILES | xargs -0 "${{ runner.temp }}/typos/typos" --format json) + git checkout FETCH_HEAD -- $OLD_FILES + OLD_TYPOS=$(echo -n $OLD_FILES | xargs -0 "${{ runner.temp }}/typos/typos" --format json) + python -c ' +import sys, json +existing = set(typo["typo"] for typo in json.loads("["+sys.argv[1].replace("\n", ",")+"]")) +for new in json.loads("["+sys.argv[2].replace("\n", ",")+"]"): + if new["typo"] not in existing: + print("::warning file={},line={},col={}::perhaps \"{}\" should be \"{}\".".format( + new["path"], new["line_num"], new["byte_offset"], + new["typo"], " or ".join(new["corrections"])))' "$OLD_TYPOS" "$NEW_TYPOS" From c70961ec50e32aa14038ce9ad155c9c3678122bd Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:02:13 -0500 Subject: [PATCH 21/43] indentation --- .github/workflows/SpellCheck.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 82bdafe615900..128797e4ebedb 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -36,10 +36,10 @@ jobs: git checkout FETCH_HEAD -- $OLD_FILES OLD_TYPOS=$(echo -n $OLD_FILES | xargs -0 "${{ runner.temp }}/typos/typos" --format json) python -c ' -import sys, json -existing = set(typo["typo"] for typo in json.loads("["+sys.argv[1].replace("\n", ",")+"]")) -for new in json.loads("["+sys.argv[2].replace("\n", ",")+"]"): - if new["typo"] not in existing: - print("::warning file={},line={},col={}::perhaps \"{}\" should be \"{}\".".format( - new["path"], new["line_num"], new["byte_offset"], - new["typo"], " or ".join(new["corrections"])))' "$OLD_TYPOS" "$NEW_TYPOS" + import sys, json + existing = set(typo["typo"] for typo in json.loads("["+sys.argv[1].replace("\n", ",")+"]")) + for new in json.loads("["+sys.argv[2].replace("\n", ",")+"]"): + if new["typo"] not in existing: + print("::warning file={},line={},col={}::perhaps \"{}\" should be \"{}\".".format( + new["path"], new["line_num"], new["byte_offset"], + new["typo"], " or ".join(new["corrections"])))' "$OLD_TYPOS" "$NEW_TYPOS" From 5778a1e2137671e0e09d3f714215b10427685f7c Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:03:57 -0500 Subject: [PATCH 22/43] debug --- .github/workflows/SpellCheck.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 128797e4ebedb..8a5de553029d3 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -30,11 +30,17 @@ jobs: --quiet --output-document=- "${RELEASE_ASSET_URL}" \ | tar -xz -C "${{ runner.temp }}/typos" ./typos "${{ runner.temp }}/typos/typos" --version + echo z OLD_FILES=$(git diff-index --name-only --diff-filter=ad -z FETCH_HEAD) - NEW_FILES=$(git diff-index --name-only --diff-filter=d -d FETCH_HEAD) + echo a + NEW_FILES=$(git diff-index --name-only --diff-filter=d -z FETCH_HEAD) + echo b NEW_TYPOS=$(echo -n $NEW_FILES | xargs -0 "${{ runner.temp }}/typos/typos" --format json) + echo c git checkout FETCH_HEAD -- $OLD_FILES + echo d OLD_TYPOS=$(echo -n $OLD_FILES | xargs -0 "${{ runner.temp }}/typos/typos" --format json) + echo e python -c ' import sys, json existing = set(typo["typo"] for typo in json.loads("["+sys.argv[1].replace("\n", ",")+"]")) From 6f18b0c156fdb3d9c9f01382db80a342c33b7c3f Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:07:57 -0500 Subject: [PATCH 23/43] use newlines instead of null bytes --- .github/workflows/SpellCheck.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 8a5de553029d3..9c4c5ddae3a51 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -31,15 +31,15 @@ jobs: | tar -xz -C "${{ runner.temp }}/typos" ./typos "${{ runner.temp }}/typos/typos" --version echo z - OLD_FILES=$(git diff-index --name-only --diff-filter=ad -z FETCH_HEAD) + OLD_FILES=$(git diff-index --name-only --diff-filter=ad FETCH_HEAD) echo a - NEW_FILES=$(git diff-index --name-only --diff-filter=d -z FETCH_HEAD) + NEW_FILES=$(git diff-index --name-only --diff-filter=d FETCH_HEAD) echo b - NEW_TYPOS=$(echo -n $NEW_FILES | xargs -0 "${{ runner.temp }}/typos/typos" --format json) + NEW_TYPOS=$(echo -n $NEW_FILES | xargs -d '\n' "${{ runner.temp }}/typos/typos" --format json) echo c git checkout FETCH_HEAD -- $OLD_FILES echo d - OLD_TYPOS=$(echo -n $OLD_FILES | xargs -0 "${{ runner.temp }}/typos/typos" --format json) + OLD_TYPOS=$(echo -n $OLD_FILES | xargs -d '\n' "${{ runner.temp }}/typos/typos" --format json) echo e python -c ' import sys, json From 680bd4b5af8c167de65d4e8f22a5654def4e80a9 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:10:23 -0500 Subject: [PATCH 24/43] user default delim? --- .github/workflows/SpellCheck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 9c4c5ddae3a51..f6293c6a8cbd0 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -35,11 +35,11 @@ jobs: echo a NEW_FILES=$(git diff-index --name-only --diff-filter=d FETCH_HEAD) echo b - NEW_TYPOS=$(echo -n $NEW_FILES | xargs -d '\n' "${{ runner.temp }}/typos/typos" --format json) + NEW_TYPOS=$(echo -n $NEW_FILES | xargs "${{ runner.temp }}/typos/typos" --format json) echo c git checkout FETCH_HEAD -- $OLD_FILES echo d - OLD_TYPOS=$(echo -n $OLD_FILES | xargs -d '\n' "${{ runner.temp }}/typos/typos" --format json) + OLD_TYPOS=$(echo -n $OLD_FILES | xargs "${{ runner.temp }}/typos/typos" --format json) echo e python -c ' import sys, json From f1cfdbf762663dd37e23701eb9f84ece491dadc7 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:13:50 -0500 Subject: [PATCH 25/43] add do -i --- .github/workflows/SpellCheck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index f6293c6a8cbd0..c4dd32c023567 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -35,11 +35,11 @@ jobs: echo a NEW_FILES=$(git diff-index --name-only --diff-filter=d FETCH_HEAD) echo b - NEW_TYPOS=$(echo -n $NEW_FILES | xargs "${{ runner.temp }}/typos/typos" --format json) + do -i {NEW_TYPOS=$(echo -n $NEW_FILES | xargs "${{ runner.temp }}/typos/typos" --format json)} echo c git checkout FETCH_HEAD -- $OLD_FILES echo d - OLD_TYPOS=$(echo -n $OLD_FILES | xargs "${{ runner.temp }}/typos/typos" --format json) + do -i {OLD_TYPOS=$(echo -n $OLD_FILES | xargs "${{ runner.temp }}/typos/typos" --format json)} echo e python -c ' import sys, json From 619ec8e92826ceaf534bb02b3064a14579d2f48c Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:16:10 -0500 Subject: [PATCH 26/43] replace 'do -i' with '|| true' --- .github/workflows/SpellCheck.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index c4dd32c023567..a97a736930209 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -20,7 +20,6 @@ jobs: GH_TOKEN: "${{ github.token }}" run: | git fetch --depth=1 origin ${{ github.base_ref }} - set -o pipefail mkdir -p "${{ runner.temp }}/typos" RELEASE_ASSET_URL="$( gh api /repos/crate-ci/typos/releases/latest \ @@ -35,11 +34,11 @@ jobs: echo a NEW_FILES=$(git diff-index --name-only --diff-filter=d FETCH_HEAD) echo b - do -i {NEW_TYPOS=$(echo -n $NEW_FILES | xargs "${{ runner.temp }}/typos/typos" --format json)} + NEW_TYPOS=$(echo -n $NEW_FILES | xargs "${{ runner.temp }}/typos/typos" --format json) || true echo c git checkout FETCH_HEAD -- $OLD_FILES echo d - do -i {OLD_TYPOS=$(echo -n $OLD_FILES | xargs "${{ runner.temp }}/typos/typos" --format json)} + OLD_TYPOS=$(echo -n $OLD_FILES | xargs "${{ runner.temp }}/typos/typos" --format json) || true echo e python -c ' import sys, json From ce44b04e061394e6450b06a2e4b6f4ccffe38ac9 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:18:25 -0500 Subject: [PATCH 27/43] use exit code --- .github/workflows/SpellCheck.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index a97a736930209..1b61aa39b489e 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -43,8 +43,11 @@ jobs: python -c ' import sys, json existing = set(typo["typo"] for typo in json.loads("["+sys.argv[1].replace("\n", ",")+"]")) + clean = True for new in json.loads("["+sys.argv[2].replace("\n", ",")+"]"): if new["typo"] not in existing: + clean = False print("::warning file={},line={},col={}::perhaps \"{}\" should be \"{}\".".format( new["path"], new["line_num"], new["byte_offset"], - new["typo"], " or ".join(new["corrections"])))' "$OLD_TYPOS" "$NEW_TYPOS" + new["typo"], " or ".join(new["corrections"]))) + sys.exit(1 if not clean else 0)' "$OLD_TYPOS" "$NEW_TYPOS" From c2bc0ad09536e31ec4199a9cefd6472e21e4e1a6 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:19:22 -0500 Subject: [PATCH 28/43] cleanup and formatting --- .github/workflows/SpellCheck.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 1b61aa39b489e..9136f88112df3 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -20,6 +20,9 @@ jobs: GH_TOKEN: "${{ github.token }}" run: | git fetch --depth=1 origin ${{ github.base_ref }} + OLD_FILES=$(git diff-index --name-only --diff-filter=ad FETCH_HEAD) + NEW_FILES=$(git diff-index --name-only --diff-filter=d FETCH_HEAD) + mkdir -p "${{ runner.temp }}/typos" RELEASE_ASSET_URL="$( gh api /repos/crate-ci/typos/releases/latest \ @@ -29,17 +32,11 @@ jobs: --quiet --output-document=- "${RELEASE_ASSET_URL}" \ | tar -xz -C "${{ runner.temp }}/typos" ./typos "${{ runner.temp }}/typos/typos" --version - echo z - OLD_FILES=$(git diff-index --name-only --diff-filter=ad FETCH_HEAD) - echo a - NEW_FILES=$(git diff-index --name-only --diff-filter=d FETCH_HEAD) - echo b + NEW_TYPOS=$(echo -n $NEW_FILES | xargs "${{ runner.temp }}/typos/typos" --format json) || true - echo c git checkout FETCH_HEAD -- $OLD_FILES - echo d OLD_TYPOS=$(echo -n $OLD_FILES | xargs "${{ runner.temp }}/typos/typos" --format json) || true - echo e + python -c ' import sys, json existing = set(typo["typo"] for typo in json.loads("["+sys.argv[1].replace("\n", ",")+"]")) From e3c6a96b8a4bd18b6e6c1111eba5b831285a8b19 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:21:22 -0500 Subject: [PATCH 29/43] remove intentional typos from README.md (should make check green) --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index d75f0a3fc76ca..e904b3b8d6770 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,3 @@ For users who prefer IDEs, we recommend using VS Code with the For notebook users, [Jupyter](https://jupyter.org/) notebook support is available through the [IJulia](https://github.com/JuliaLang/IJulia.jl) package, and the [Pluto.jl](https://github.com/fonsp/Pluto.jl) package provides Pluto notebooks. - -This is a typo: futher, staticly - -Teh rest are quite simlpe. From 73fd900f9b8d32bf94290fefd71709f4fcd09b68 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:21:55 -0500 Subject: [PATCH 30/43] remove non-typo additions to src/jlapi.c --- src/jlapi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/jlapi.c b/src/jlapi.c index 365a1b2bc9119..29be3b9e6179c 100644 --- a/src/jlapi.c +++ b/src/jlapi.c @@ -4,8 +4,6 @@ jlapi.c miscellaneous functions for users of libjulia.so, to handle initialization and the style of use where julia is not in control most of the time. - - This is not a typo. */ #include "platform.h" From df9fbb59d531a7bf3bacd98128a51f2c7f1a83e1 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:24:35 -0500 Subject: [PATCH 31/43] rename job --- .github/workflows/SpellCheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml index 9136f88112df3..68b7e63fe0ce8 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/SpellCheck.yml @@ -6,7 +6,7 @@ on: [pull_request] jobs: typos-check: - name: (add false positives to typos.toml) + name: Check for new typos runs-on: ubuntu-latest timeout-minutes: 5 steps: From 6d7c9467271b89f2941d1d79615c4accf305a255 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:25:48 -0500 Subject: [PATCH 32/43] more rename --- .github/workflows/{SpellCheck.yml => Typos.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{SpellCheck.yml => Typos.yml} (99%) diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/Typos.yml similarity index 99% rename from .github/workflows/SpellCheck.yml rename to .github/workflows/Typos.yml index 68b7e63fe0ce8..c37b0e4255e1b 100644 --- a/.github/workflows/SpellCheck.yml +++ b/.github/workflows/Typos.yml @@ -1,4 +1,4 @@ -name: Spell Check +name: Typos permissions: {} From d4dbcc7aec1e82ae9f543eecf7638f971ac5df55 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:37:05 -0500 Subject: [PATCH 33/43] don't pass around massive arguments to avoid error --- .github/workflows/Typos.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/Typos.yml b/.github/workflows/Typos.yml index c37b0e4255e1b..f292fa313cc38 100644 --- a/.github/workflows/Typos.yml +++ b/.github/workflows/Typos.yml @@ -33,18 +33,23 @@ jobs: | tar -xz -C "${{ runner.temp }}/typos" ./typos "${{ runner.temp }}/typos/typos" --version - NEW_TYPOS=$(echo -n $NEW_FILES | xargs "${{ runner.temp }}/typos/typos" --format json) || true + echo -n $NEW_FILES | xargs "${{ runner.temp }}/typos/typos" --format json >> ${{ runner.temp }}/new_typos.jsonl || true git checkout FETCH_HEAD -- $OLD_FILES - OLD_TYPOS=$(echo -n $OLD_FILES | xargs "${{ runner.temp }}/typos/typos" --format json) || true + echo -n $OLD_FILES | xargs "${{ runner.temp }}/typos/typos" --format json >> ${{ runner.temp }}/old_typos.jsonl || true python -c ' import sys, json - existing = set(typo["typo"] for typo in json.loads("["+sys.argv[1].replace("\n", ",")+"]")) + existing = set() + with open(sys.argv[1]) as existing_file: + for line in existing_file: + existing.add(json.load(line)["typo"]) clean = True - for new in json.loads("["+sys.argv[2].replace("\n", ",")+"]"): - if new["typo"] not in existing: - clean = False - print("::warning file={},line={},col={}::perhaps \"{}\" should be \"{}\".".format( - new["path"], new["line_num"], new["byte_offset"], - new["typo"], " or ".join(new["corrections"]))) - sys.exit(1 if not clean else 0)' "$OLD_TYPOS" "$NEW_TYPOS" + with open(sys.argv[2]) as new_file: + for line in new_file: + new = json.load(line) + if new["typo"] not in existing: + clean = False + print("::warning file={},line={},col={}::perhaps \"{}\" should be \"{}\".".format( + new["path"], new["line_num"], new["byte_offset"], + new["typo"], " or ".join(new["corrections"]))) + sys.exit(1 if not clean else 0)' "${{ runner.temp }}/new_typos.jsonl" "${{ runner.temp }}/new_typos.jsonl" From 80fa72dd960a47c6eecec57330f8ef32dd8f35fe Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:37:52 -0500 Subject: [PATCH 34/43] add typo --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e904b3b8d6770..14f61193e2c97 100644 --- a/README.md +++ b/README.md @@ -161,3 +161,5 @@ For users who prefer IDEs, we recommend using VS Code with the For notebook users, [Jupyter](https://jupyter.org/) notebook support is available through the [IJulia](https://github.com/JuliaLang/IJulia.jl) package, and the [Pluto.jl](https://github.com/fonsp/Pluto.jl) package provides Pluto notebooks. + +teh \ No newline at end of file From 43f9a82de47b6e3bae57721aeb3171150ba5b77b Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:39:26 -0500 Subject: [PATCH 35/43] fix typo in python code --- .github/workflows/Typos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Typos.yml b/.github/workflows/Typos.yml index f292fa313cc38..c845f45eabd58 100644 --- a/.github/workflows/Typos.yml +++ b/.github/workflows/Typos.yml @@ -42,11 +42,11 @@ jobs: existing = set() with open(sys.argv[1]) as existing_file: for line in existing_file: - existing.add(json.load(line)["typo"]) + existing.add(json.loads(line)["typo"]) clean = True with open(sys.argv[2]) as new_file: for line in new_file: - new = json.load(line) + new = json.loads(line) if new["typo"] not in existing: clean = False print("::warning file={},line={},col={}::perhaps \"{}\" should be \"{}\".".format( From 0ac4f99c40a66a5841aaa9afd58b81faacbebf9f Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:42:05 -0500 Subject: [PATCH 36/43] fix another pyhton bug --- .github/workflows/Typos.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Typos.yml b/.github/workflows/Typos.yml index c845f45eabd58..fa76f95e9b355 100644 --- a/.github/workflows/Typos.yml +++ b/.github/workflows/Typos.yml @@ -39,17 +39,17 @@ jobs: python -c ' import sys, json - existing = set() - with open(sys.argv[1]) as existing_file: - for line in existing_file: - existing.add(json.loads(line)["typo"]) + old = set() + with open(sys.argv[1]) as old_file: + for line in old_file: + old.add(json.loads(line)["typo"]) clean = True with open(sys.argv[2]) as new_file: for line in new_file: new = json.loads(line) - if new["typo"] not in existing: + if new["typo"] not in old: clean = False print("::warning file={},line={},col={}::perhaps \"{}\" should be \"{}\".".format( new["path"], new["line_num"], new["byte_offset"], new["typo"], " or ".join(new["corrections"]))) - sys.exit(1 if not clean else 0)' "${{ runner.temp }}/new_typos.jsonl" "${{ runner.temp }}/new_typos.jsonl" + sys.exit(1 if not clean else 0)' "${{ runner.temp }}/old_typos.jsonl" "${{ runner.temp }}/new_typos.jsonl" From 35408ae5f65eb816c0fe2a32de87c0bf8a6bc36f Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 11:43:42 -0500 Subject: [PATCH 37/43] add non-typo change to file with existing false-positives --- src/jlapi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jlapi.c b/src/jlapi.c index 29be3b9e6179c..365a1b2bc9119 100644 --- a/src/jlapi.c +++ b/src/jlapi.c @@ -4,6 +4,8 @@ jlapi.c miscellaneous functions for users of libjulia.so, to handle initialization and the style of use where julia is not in control most of the time. + + This is not a typo. */ #include "platform.h" From a871c2c28339c1fe73405ee37aec9d6a0b8ed389 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 18:55:46 -0500 Subject: [PATCH 38/43] ignore typos that are 5 or fewer characters long --- typos.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 typos.toml diff --git a/typos.toml b/typos.toml new file mode 100644 index 0000000000000..59228e2b30d8e --- /dev/null +++ b/typos.toml @@ -0,0 +1,2 @@ +[default] +extend-ignore-words-re = ["^[a-zA-Z]?[a-zA-Z]?[a-zA-Z]?[a-zA-Z]?[a-zA-Z]?$"] From 3bc928c11ae0202d6204254860a0abff9e3c5405 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 18:57:53 -0500 Subject: [PATCH 39/43] add a longer typo to README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 14f61193e2c97..e8e47bec6b2f7 100644 --- a/README.md +++ b/README.md @@ -162,4 +162,6 @@ For notebook users, [Jupyter](https://jupyter.org/) notebook support is availabl [IJulia](https://github.com/JuliaLang/IJulia.jl) package, and the [Pluto.jl](https://github.com/fonsp/Pluto.jl) package provides Pluto notebooks. -teh \ No newline at end of file +teh + +compileable From df7c0595766124812836ab8998bddd179305ae90 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Mon, 16 Oct 2023 19:02:17 -0500 Subject: [PATCH 40/43] add news --- NEWS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index bab64a2d195ac..2d753b7047e9f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -107,5 +107,8 @@ External dependencies Tooling Improvements -------------------- +* CI now performs limited automatic typo detection on all PRs. If you merge a PR with a + failing typo CI check, then the reported typos will be automatically ignored in future CI + runs on PRs that edit those same files. ([#51704]) From 9f87862fdc707169c6b38ffe43229dc07e555066 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Tue, 17 Oct 2023 07:49:06 -0500 Subject: [PATCH 41/43] stop ignoring short typos, instead annotate but let CI pass --- .github/workflows/Typos.yml | 3 ++- typos.toml | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 typos.toml diff --git a/.github/workflows/Typos.yml b/.github/workflows/Typos.yml index fa76f95e9b355..f9fa20fff5d12 100644 --- a/.github/workflows/Typos.yml +++ b/.github/workflows/Typos.yml @@ -48,7 +48,8 @@ jobs: for line in new_file: new = json.loads(line) if new["typo"] not in old: - clean = False + if len(new["typo"]) > 6: # Short typos might be false positives. Long are probably real. + clean = False print("::warning file={},line={},col={}::perhaps \"{}\" should be \"{}\".".format( new["path"], new["line_num"], new["byte_offset"], new["typo"], " or ".join(new["corrections"]))) diff --git a/typos.toml b/typos.toml deleted file mode 100644 index 59228e2b30d8e..0000000000000 --- a/typos.toml +++ /dev/null @@ -1,2 +0,0 @@ -[default] -extend-ignore-words-re = ["^[a-zA-Z]?[a-zA-Z]?[a-zA-Z]?[a-zA-Z]?[a-zA-Z]?$"] From 38d8272f191401eb7bea6714b1229181b79f7c27 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Tue, 17 Oct 2023 09:02:12 -0500 Subject: [PATCH 42/43] put back typos.toml ignoring typos of length less than or euqal to 4 --- typos.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 typos.toml diff --git a/typos.toml b/typos.toml new file mode 100644 index 0000000000000..b9a9311946bc4 --- /dev/null +++ b/typos.toml @@ -0,0 +1,2 @@ +[default] +extend-ignore-words-re = ["^[a-zA-Z]?[a-zA-Z]?[a-zA-Z]?[a-zA-Z]?$"] From 06751de9990b7a436fc0d9ad0bf26a81e519c836 Mon Sep 17 00:00:00 2001 From: Lilith Hafner Date: Sat, 21 Oct 2023 08:39:31 -0500 Subject: [PATCH 43/43] remove intentional typos --- README.md | 4 ---- src/jlapi.c | 2 -- 2 files changed, 6 deletions(-) diff --git a/README.md b/README.md index e8e47bec6b2f7..e904b3b8d6770 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,3 @@ For users who prefer IDEs, we recommend using VS Code with the For notebook users, [Jupyter](https://jupyter.org/) notebook support is available through the [IJulia](https://github.com/JuliaLang/IJulia.jl) package, and the [Pluto.jl](https://github.com/fonsp/Pluto.jl) package provides Pluto notebooks. - -teh - -compileable diff --git a/src/jlapi.c b/src/jlapi.c index 365a1b2bc9119..29be3b9e6179c 100644 --- a/src/jlapi.c +++ b/src/jlapi.c @@ -4,8 +4,6 @@ jlapi.c miscellaneous functions for users of libjulia.so, to handle initialization and the style of use where julia is not in control most of the time. - - This is not a typo. */ #include "platform.h"