Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
- name: Go vet
run: |
make vet
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
tests:
name: Unit tests
runs-on: ubuntu-latest
Expand All @@ -37,6 +41,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Free up runner disk space
run: |
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /opt/hostedtoolcache/Python
- name: Get short commit hash
run: echo "SHORT_SHA=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
- name: Setup Go
Expand Down
43 changes: 43 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
run:
timeout: 10m

output:
# Make output more digestible with quickfix in vim/emacs/etc.
sort-results: true
print-issued-lines: false

linters:
# We'll track the golangci-lint default linters manually
# instead of letting them change without our control.
disable-all: true
enable:
# golangci-lint defaults:
# - errcheck
- gosimple
- govet
- ineffassign
- staticcheck
# - unused

# Our own extras:
- gofmt
- nolintlint # lints nolint directives
# - revive

linters-settings:
govet:
# These govet checks are disabled by default, but they're useful.
enable:
- nilness
- reflectvaluecompare
- sortslice
- unusedwrite

issues:
# Print all issues reported by all linters.
max-issues-per-linter: 0
max-same-issues: 0

# Don't ignore some of the issues that golangci-lint considers okay.
# This includes documenting all exported entities.
exclude-use-default: false