Upgrade golangci-lint v1.61.0 → v2.11.1 and fix all lint issues#308
Open
gavins-db wants to merge 9 commits intodatabricks:db_mainfrom
Open
Upgrade golangci-lint v1.61.0 → v2.11.1 and fix all lint issues#308gavins-db wants to merge 9 commits intodatabricks:db_mainfrom
gavins-db wants to merge 9 commits intodatabricks:db_mainfrom
Conversation
- Migrate .golangci.yml from v1 to v2 config format - Replace deprecated exportloopref with copyloopvar; remove 16 unnecessary loop variable copies - Fix 39+ auto-fixable lint issues (QF1003, QF1007, QF1008, QF1011, QF1012, ST1023, QF1001) - Fix duplicate streamer import (ST1019), error var naming (ST1012), error string formatting (ST1005) - Rename defaultMaxResolutionSeconds → defaultMaxResolution (ST1011) - Remove malformed json tag on embedded TSDBStatus field (SA5008) - Simplify De Morgan's expression in fetcher_test.go (QF1001) - Update bingo to install golangci-lint v2.11.1 - Add .vscode/ to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Migrate all faillint banned-import rules to depguard (pkg-level bans) - Migrate all faillint banned-function rules to forbidigo with analyze-types and pkg field for alias-safe matching - Remove faillint from Makefile go-lint target - Fix examples path exclusion (examples → ^examples/) to avoid matching filenames Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
humm.. it's come to my attention that upstream thanos has already updated their lint and moved to go 1.25. I will close this and reassess... perhaps I need to pull in upstream changes into db_main instead. |
Author
|
on second thought, I'll reopen, the db_main is so diverged from oss thanos that cherry-picking specific commits is a challenge. But I'll speaking with others and get their opinion offline. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current golangci-lint is VERY out of date and generates many false positives. This PR updates the linter and makes the appropriate fixes.
Making this change will unblock a few other things such as
Changes
make go-formatuses golangci-lintmake lint-fixcommand to automatically fix fixable lints.Verification
make lintnow actually works 🎉