diff --git a/.github/spellcheck/allow.txt b/.github/spellcheck/allow.txt new file mode 100644 index 0000000..c01fe56 --- /dev/null +++ b/.github/spellcheck/allow.txt @@ -0,0 +1 @@ +LaTeX diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..5f62d7c --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,40 @@ +name: Linting + +on: + pull_request: + push: + branches: + - master + +permissions: + contents: read + +env: + WORDLIST: .github/spellcheck/allow.txt + +jobs: + checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Spell check (aspell) + env: + run: | + sudo apt-get update + sudo apt-get install -y aspell aspell-en + mkdir -p "$(dirname "$WORDLIST")" + touch "$WORDLIST" + aspell --mode=tex --lang=en_US --personal="$WORDLIST" --list < resume.tex \ + | sort -u | tee misspellings.txt + if [ -s misspellings.txt ]; then + echo "Misspellings found:" + cat misspellings.txt + exit 1 + fi + + - name: LaTeX lint (chktex) + run: | + sudo apt-get update + sudo apt-get install -y chktex + chktex -q -n1 -n3 -n8 resume.tex