mirror of
https://github.com/crate-ci/typos.git
synced 2025-01-23 15:09:08 -05:00
feat(action): Report typos to github
This commit is contained in:
parent
fc7f517466
commit
2ae4d92451
2 changed files with 6 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
FROM ubuntu:20.04
|
||||
ARG VERSION=1.9.0
|
||||
ENV VERSION=${VERSION}
|
||||
RUN apt-get update && apt-get install -y wget git
|
||||
RUN apt-get update && apt-get install -y wget git jq
|
||||
RUN wget https://github.com/crate-ci/typos/releases/download/v${VERSION}/typos-v${VERSION}-x86_64-unknown-linux-musl.tar.gz && \
|
||||
tar -xzvf typos-v${VERSION}-x86_64-unknown-linux-musl.tar.gz && \
|
||||
mv typos /usr/local/bin
|
||||
|
|
|
@ -40,4 +40,9 @@ if [[ -n "${INPUT_CONFIG:-}" ]]; then
|
|||
fi
|
||||
|
||||
log "$ ${COMMAND}"
|
||||
${COMMAND} --format json |
|
||||
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 || true
|
||||
${COMMAND}
|
||||
|
|
Loading…
Add table
Reference in a new issue