Skip to content

add documentation for error returned by ParseRequest, use it in tests #188

add documentation for error returned by ParseRequest, use it in tests

add documentation for error returned by ParseRequest, use it in tests #188

Workflow file for this run

on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
module: [".", "./integration"]
name: Lint (${{ matrix.module }})
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23.x"
- name: Check for //go:build ignore in .go files
working-directory: ${{ matrix.module }}
run: |
IGNORED_FILES=$(grep -rl '//go:build ignore' . --include='*.go') || true
if [ -n "$IGNORED_FILES" ]; then
echo "::error::Found ignored Go files: $IGNORED_FILES"
exit 1
fi
- name: Check that go.mod is tidied
if: success() || failure() # run this step even if the previous one failed
working-directory: ${{ matrix.module }}
run: |
cp go.mod go.mod.orig
cp go.sum go.sum.orig
go mod tidy
diff go.mod go.mod.orig
diff go.sum go.sum.orig
- name: gofmt
if: success() || failure() # run this step even if the previous one failed
working-directory: ${{ matrix.module }}
run: |
out=$(gofmt -s -l .)
if [[ -n "$out" ]]; then
echo $out | awk '{print "::error file=" $0 ",line=0,col=0::File is not gofmt-ed."}'
exit 1
fi
- name: go vet
if: success() || failure() # run this step even if the previous one failed
working-directory: ${{ matrix.module }}
run: go vet ./...
- name: Install staticcheck
if: success() || failure() # run this step even if the previous one failed
run: go install honnef.co/go/tools/cmd/[email protected]
- name: staticcheck
if: success() || failure() # run this step even if the previous one failed
working-directory: ${{ matrix.module }}
run: |
set -o pipefail
staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g'