Add source code linting for go to CI
This commit is contained in:
parent
1325844539
commit
2fd013b593
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@ -76,7 +76,7 @@ jobs:
|
|||||||
fetch-depth: 0 # needed for :commit: docs role
|
fetch-depth: 0 # needed for :commit: docs role
|
||||||
|
|
||||||
- name: Test for trailing whitespace
|
- 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
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v3
|
||||||
@ -94,6 +94,9 @@ jobs:
|
|||||||
- name: Run pyflakes
|
- name: Run pyflakes
|
||||||
run: python -m flake8 --count .
|
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
|
- name: Build kitty package
|
||||||
run: python .github/workflows/ci.py package
|
run: python .github/workflows/ci.py package
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user