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
14 changes: 7 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: stable
- uses: actions/checkout@v4
- uses: golangci/golangci-lint-action@v8
- uses: actions/checkout@v6
- uses: golangci/golangci-lint-action@v9
cross:
name: Cross
timeout-minutes: 10
Expand All @@ -37,11 +37,11 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Cross
working-directory: ci
run: go run mage.go -v -w ../ crossBuild
Expand All @@ -56,10 +56,10 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Test
run: go test -race -v ./...
37 changes: 0 additions & 37 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ linters:
- asasalint
- asciicheck
- bidichk
- bodyclose
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we enable linting on tests? I agree that in this codebase, bodyclose is less useful, then again, I've seen it catch some things that were overlooked, and the codebase is relatively small so not a huge concern to run more linters?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- contextcheck
- durationcheck
- errchkjson
Expand All @@ -22,46 +21,10 @@ linters:
- nilerr
- nilnesserr
- noctx
- protogetter
- reassign
- recvcheck
- rowserrcheck
- spancheck
- sqlclosecheck
- testifylint
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should enable this one for tests though; I recall there was a PR that fixed issues reported by it, so would be good to have it run in CI to make sure we don't regress;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's address this as a followup -- the focus of this one is to simplify things / remove useless configuration. If I add some linters for test files, this PR will probably grow much bigger (and harder to review).

I just checked, if we lint test files (and leave testifylint), we get 19 issues, 7 of those for testifylint. I can fix all those but not in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I have three more commits that enable some linters for test files (including testifylint) and fix some of their warnings. Let me know if you want those commits here in this PR @thaJeztah

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's bring this PR in; ok or a follow-up 👍

- unparam
- zerologlint
disable:
- prealloc
settings:
errcheck:
check-type-assertions: false
check-blank: false
lll:
line-length: 100
tab-width: 4
prealloc:
simple: false
range-loops: false
for-loops: false
whitespace:
multi-if: false
multi-func: false
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

5 changes: 0 additions & 5 deletions travis/cross_build.sh

This file was deleted.

8 changes: 0 additions & 8 deletions travis/install.sh

This file was deleted.

Loading