mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-23 17:41:01 -05:00
6855a78893
Using composite instead of docker to avoid building image, it can make the action faster. If the `typos` command doesn't exist, download and extract it.
9 lines
274 B
Bash
Executable file
9 lines
274 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
grep '"type":"typo"' |
|
|
jq --sort-keys --raw-output '"::warning file=\(.path),line=\(.line_num),col=\(.byte_offset)::\"\(.typo)\" should be \"" + (.corrections // [] | join("\" or \"") + "\".")' |
|
|
while IFS= read -r line; do
|
|
echo "$line"
|
|
done
|