Add source code linting for go to CI

This commit is contained in:
Kovid Goyal 2022-08-16 09:46:14 +05:30
parent 1325844539
commit 2fd013b593
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -76,7 +76,7 @@ jobs:
fetch-depth: 0 # needed for :commit: docs role
- name: Test for trailing whitespace
run: if grep -Inr '\s$' kitty kitty_tests kittens docs *.py *.asciidoc *.rst .gitattributes .gitignore; then echo Trailing whitespace found, aborting.; exit 1; fi
run: if grep -Inr '\s$' kitty kitty_tests kittens docs *.py *.asciidoc *.rst *.go .gitattributes .gitignore; then echo Trailing whitespace found, aborting.; exit 1; fi
- name: Set up Python
uses: actions/setup-python@v3
@ -94,6 +94,9 @@ jobs:
- name: Run pyflakes
run: python -m flake8 --count .
- name: Run gofmt
run: unformatted=$(gofmt -s -l tools version.go); [ -n "$unformatted" ] && { echo "$unformatted"; exit 1 }
- name: Build kitty package
run: python .github/workflows/ci.py package