Files
typos/docker/format_gh.sh
T
Ed Page a950dd27ff refactor(gh): Pull out formatter
This makes for easier local testing.
2022-06-22 12:16:12 -05:00

10 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