Skip to content

Conversation

@kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Jan 20, 2026

For details, see individual commits. High level overview:

  • bump GH actions to their latest versions (older ones may cease to work due to Node version bumps);
  • simplify .golangci.yml (no functional changes);
  • remove travis scripts and config;
  • remove mage thingie.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Prealloc linter is disabled by default, so it does not make sense to:
 - have it disabled explicitly;
 - have any configuration for it.

Should not result in any changes to CI runs.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
These two linters are not enabled, so it does not make sense to have
any configuration for them.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
The options configured (check-type-assertions and check-blank) default
to false, so it does not make sense to configure them explicitly.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1. We do not have any formatters configured, so remove formatters
   configuration.

2. We do not have any paths like those excluded in configuration,
   so remove the excluded paths.

3. Remove "exclusions / generated: lax" as we don't have any generated
   code, and the default of "generated: strict" is fine.

4. Remove "comments" and "common-false-positives" from
   "exclusions / presets" as they don't hide any warnings.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1. bodyclose (https://github.com/timakin/bodyclose) validates whether
   *net/http.Response of HTTP request calls method Body.Close(), and
   we only use it in a single test (and linting test files are disabled
   in configuration).

2. protogetter (https://github.com/ghostiam/protogetter) -- we do not
   use protobuf.

3. rowserrcheck (https://github.com/jingyugao/rowserrcheck) and
   sqlclosecheck (https://github.com/ryanrolds/sqlclosecheck) --
   we don't use SQL.

4. spancheck (https://github.com/jjti/go-spancheck) -- we don't use
   OpenTelemetry nor OpenCensus.

5. testifylint (https://github.com/Antonboom/testifylint) checks the
   code that uses github.com/stretchr/testify, which is only used in
   tests, and we have test file linting disabled.

6. zerologlint (https://github.com/ykadowak/zerologlint) -- we don't
   use zerolog.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
AFAIK travis-ci is not used for this repo for quite some time,
so its scripts and config can be safely removed.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Contributor Author

I guess this can be split into 3 or 4 more digestible PRs (bumps, golangci-lint, removal) -- let me know if you want me to split it @thaJeztah

- 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 👍

- 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.

@@ -1,15 +0,0 @@
language: go
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah! Good find; I thought I removed it, but that was AppVeyor (but had to add it back because I don't have access to settings to disable it 😓 #1465)

Comment on lines 41 to 45
- name: Build
run: |
for target in linux/amd64 darwin/amd64 darwin/arm64 freebsd/amd64 js/wasm solaris/amd64 windows/amd64 windows/arm64; do
echo "Building for $target"
GOOS=${target%/*} GOARCH=${target#*/} go build ./...
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps this one would be good to move to a separate PR; effectively this reverts #1208

Admitted, I wasn't a fan of adding that as dependency (so I moved it to a separate module in a follow-up), but there's pros and cons to shell script.

(That said, perhaps if we would stick with mage, we should bump the go version and make sure we add more cross targets?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

effectively this reverts #1208

Not really -- I took a look at the history before implementing this change. Before #1208 the script used a tool called gox, and now it's merely a loop over goos/goarch pairs.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, right, yes it did.

I wonder if we should / could use Go itself to enumerate cross-compile targets; possibly with an exclusion list for those that can't work; I did a quick search, and it looks like go tool dist list can enumerate all options;

go tool dist list
aix/ppc64
android/386
android/amd64
android/arm
android/arm64
darwin/amd64
darwin/arm64
dragonfly/amd64
freebsd/386
freebsd/amd64
freebsd/arm
freebsd/arm64
freebsd/riscv64
illumos/amd64
ios/amd64
ios/arm64
js/wasm
linux/386
linux/amd64
linux/arm
linux/arm64
linux/loong64
linux/mips
linux/mips64
linux/mips64le
linux/mipsle
linux/ppc64
linux/ppc64le
linux/riscv64
linux/s390x
netbsd/386
netbsd/amd64
netbsd/arm
netbsd/arm64
openbsd/386
openbsd/amd64
openbsd/arm
openbsd/arm64
openbsd/ppc64
openbsd/riscv64
plan9/386
plan9/amd64
plan9/arm
solaris/amd64
wasip1/wasm
windows/386
windows/amd64
windows/arm64

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #1478

@kolyshkin
Copy link
Contributor Author

Removed the last commit away from here; will work on it once this PR will be merged.

Copy link
Collaborator

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@thaJeztah thaJeztah merged commit 524506f into sirupsen:master Jan 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants