-
Notifications
You must be signed in to change notification settings - Fork 67
Upgrade Golangci-lint to v2.6
#200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Most of it is done by running the official migration tool:
golangci-lint migrate
and then some polishing.
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
This is to fix staticcheck's error code QF1006. Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request improves code documentation and linting configuration across the codebase. The changes primarily focus on adding function names to godoc comments to align with Go documentation best practices, fixing typos, and updating the linting infrastructure.
Key changes:
- Added function names to godoc comments for better documentation clarity
- Fixed spelling errors in comments ("wraping" → "wrapping", "searach" → "search")
- Updated golangci-lint configuration to v2 with refined settings
- Removed obsolete build constraint syntax and package documentation from test files
- Simplified loop conditions in BFS traversal logic
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/term/env_test.go | Removed redundant package documentation comment from test file |
| pkg/term/console_windows.go | Removed obsolete // +build constraint syntax |
| pkg/term/console.go | Removed obsolete // +build constraint syntax |
| pkg/repository/repository.go | Added function name to godoc comment |
| pkg/markdown/markdown.go | Added function name and corrected spelling in godoc comment |
| pkg/jq/jq.go | Added function names to godoc comments |
| pkg/config/errors.go | Added function names to godoc comments |
| pkg/config/config.go | Added function names and blank lines to godoc comments |
| pkg/api/rest_client.go | Added function name and blank line to godoc comment |
| pkg/api/http_client.go | Added function name and blank line to godoc comment |
| pkg/api/graphql_client.go | Added function name and blank line to godoc comment |
| pkg/api/errors.go | Added function names to godoc comments |
| internal/yamlmap/yaml_map.go | Added function names, fixed spelling, and simplified loop conditions |
| internal/git/url.go | Added function name to godoc comment |
| internal/git/remote.go | Added function name to godoc comment |
| gh.go | Added function name to godoc comment |
| .golangci.yml | Updated to version 2 with expanded linter settings |
| .github/workflows/lint.yml | Updated golangci-lint-action to v8.0.0 with pinned SHA |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,5 +1,3 @@ | |||
| // Package term provides information about the terminal that the current process is connected to (if any), | |||
| // for example measuring the dimensions of the terminal and inspecting whether it's safe to output color. | |||
| package term | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant since this is a test package, and also the doc is present in pkg/term/env.go:
Lines 1 to 3 in f6d1f60
| // Package term provides information about the terminal that the current process is connected to (if any), | |
| // for example measuring the dimensions of the terminal and inspecting whether it's safe to output color. | |
| package term |
Fixes #199
Also, fixed godocs as suggested by
godoclint, but didn't enable the linter.