chore: remove redundant code and update build tags#595
Conversation
Ran `golangci-lint run --fix` to: - Eliminates unnecessary blank lines and redundant code across multiple files to improve readability and maintainability. - Updates Go build tags by removing legacy `+build` comments, standardizing on `//go:build` syntax for test files. Updates linter configuration to use `wsl_v5` with custom settings in `.golangci.yml`. Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
9e21acf to
7f80aa6
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR performs automated code cleanup by removing redundant code and standardizing build tags across the codebase. The changes improve code maintainability and readability while ensuring compliance with modern Go conventions.
- Removes legacy
// +buildcomments from 60+ test files, standardizing on//go:buildsyntax - Eliminates unnecessary blank lines throughout the codebase to improve readability
- Updates linter configuration to use
wsl_v5with custom settings for whitespace management
Reviewed Changes
Copilot reviewed 104 out of 104 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Multiple test files (60+ files) | Removed legacy // +build build tag comments, keeping only //go:build directives |
| Multiple Go source files | Removed unnecessary blank lines between variable declarations and error checks to improve code flow |
.golangci.yml |
Updated linter from wsl to wsl_v5 with custom configuration and added staticcheck SA1019 exclusion |
internal/models/kubernetessecret/clustergroup/*.go |
Reformatted import statements to use multi-line format |
Test files in internal/resources/*/tests/ |
Added blank lines in test functions to improve readability between test step blocks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Summary
Ran
golangci-lint run --fixto:+buildcomments, standardizing on//go:buildsyntax for test files.Updates linter configuration to use
wsl_v5with custom settings in.golangci.yml.Type
Please describe:
Breaking Changes?
Test and Documentation
Issue References
Additional Information