Report card fixes
Simple stuff.
I recommend installing misspell and saving the following file as .git/hooks/pre-commit
in your Sia directory:
#!/bin/bash
git diff --cached --name-only | while read FILE; do
misspell -error "$FILE"
if [ $? -ne 0 ]; then
echo "Aborting commit due to typos. Use --no-verify to commit anyway." >&2
exit 1
fi
done
(Don't forget to make it executable.)
Misspell isn't perfect; there's a lot it doesn't catch. It's designed to fix common misspellings, not all possible typos. It doesn't check grammar either. But it's much better than nothing.
Like gofmt
, misspell can automatically fix typos if you use the -w
flag. The only reason my git hook script doesn't do this is that sometimes misspell suggests the wrong fix. You should double check the output before using -w
.