From d0059aa93e962e568685e6eb61b514692d71c133 Mon Sep 17 00:00:00 2001 From: Trevor Brown Date: Sat, 27 Jan 2024 15:28:35 -0500 Subject: [PATCH] feat: add linting for Golang to GitHub lint workflow --- .github/workflows/lint.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index eee61a53..5657c3ff 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,7 +10,7 @@ env: PYTHON_MIN_VERSION: "3.7.13" jobs: - asdf: + asdf-bash: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -21,6 +21,25 @@ jobs: - run: scripts/install_dependencies.bash - run: scripts/lint.bash --check + asdf-golang: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: '1.21.5' + - name: Install dependencies + run: go get . + - name: Check format + run: [ -z "$(gofmt -l ./...)" ] + - name: Vet + run: go vet + - name: Install staticcheck for linting + run: go install honnef.co/go/tools/cmd/staticcheck@latest + - name: Lint + run: staticcheck -tests -show-ignored ./... + actions: runs-on: ubuntu-latest steps: