Skip to content

Commit

Permalink
Update spelling.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor authored Oct 16, 2023
1 parent 7ff6256 commit 76a08bf
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,17 @@ jobs:
-
name: "Checkout repository"
uses: "actions/[email protected]"
-
name: "Cache pip"
uses: "actions/cache@v3"
with:
path: "~/.cache/pip"
key: "${{ runner.os }}-pip-codespell"
-
name: "Install codespell"
run: |
pip install --user 'codespell>=2.2'
-
name: "Search for misspellings"
#uses: "crate-ci/[email protected]"
env:
GH_TOKEN: "${{ github.token }}"
# yamllint disable rule:line-length
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 grep --files-with-matches --null -I -e '.' \
| xargs -0 -t -- "${{ runner.temp }}/typos/typos" --format json \
| jq --raw-output '"::warning file=\(.path),line=\(.line_num),col=\(.byte_offset)::\"\(.typo)\" should be \"" + (.corrections // [] | join("\" or \"") + "\".")'
python -m codespell_lib

0 comments on commit 76a08bf

Please sign in to comment.