Skip to content

Golangci lint fixes - #10

Open
bstoll wants to merge 2 commits into
mainfrom
golangci-lint-fixes
Open

Golangci lint fixes#10
bstoll wants to merge 2 commits into
mainfrom
golangci-lint-fixes

Conversation

@bstoll

@bstoll bstoll commented Jun 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

@coveralls

coveralls commented Jun 26, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 28976590405

Coverage decreased (-0.08%) to 41.978%

Details

  • Coverage decreased (-0.08%) from the base build.
  • Patch coverage: Could not be determined — this PR's diff is too large for GitHub to return (406 error at GitHub).
  • 345 coverage regressions across 13 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

345 previously-covered lines in 13 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
deploy/deploy.go 159 61.77%
topo/topo.go 54 80.45%
topo/node/cisco/cisco.go 35 89.61%
topo/node/node.go 24 31.39%
cmd/root.go 20 4.91%
x/wire/wire.go 15 36.3%
topo/node/sonic/sonic.go 11 89.1%
api/metallb/clientset/v1beta1/client.go 9 58.7%
x/webhook/main.go 4 0.0%
x/wire/file/client/main.go 4 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 12354
Covered Lines: 5186
Line Coverage: 41.98%
Coverage Strength: 0.48 hits per line

💛 - Coveralls

@bstoll
bstoll force-pushed the golangci-lint-fixes branch 10 times, most recently from 41a77ca to 3947ce2 Compare June 30, 2026 00:26
@bstoll
bstoll force-pushed the golangci-lint-fixes branch 3 times, most recently from 66d7518 to ddef5ed Compare July 7, 2026 21:58
@bstoll
bstoll force-pushed the golangci-lint-fixes branch 4 times, most recently from d8b63fe to 67bcff2 Compare July 8, 2026 17:47
This change aggregates several fixes to address golangci-lint violations, format code files, and update deprecated APIs.

Key changes:
- Refactored Go code to address golangci-lint violations and update deprecated APIs:
  - Replaced deprecated `k8s.io/utils/pointer` with `k8s.io/utils/ptr`.
  - Replaced deprecated `grpc.DialContext` with `grpc.NewClient`.
  - Handled or logged errors from `CloseSend`, `ReadFrom`, `BindPFlags`, etc.
  - Standardized error message capitalization (removed leading capitals and ending punctuation).
  - Simplified boolean expressions and struct field accesses.
  - Addressed various linter-raised spelling errors and style comments (e.g. in `topo/node/sonic` and other nodes).
  - Renamed internal fields for better readability (e.g., `wantInitCtr` to `wantInitContainer` and `wantSonicCtr` to `wantSonicContainer` in `sonic.go`).
- Ran `go fmt` across all Go source files.
- Formatted YAML files and manifests according to linter configurations (added `---` document start markers, fixed spacing/indentation in cloudbuild config, deployments, and various topological templates).
- Updated configuration files for Super-Linter:
  - Added codespell configuration file `.github/linters/.codespellrc`.
  - Adjusted `.golangci.yml` linter settings.
  - Added rules to `.github/linters/.checkov.yaml`, `.github/linters/.gitleaks.toml`, etc.
  - Added dependency cooldown periods in `.github/dependabot.yml`.
- Ran Prettier on all Markdown files in the repository to ensure consistent styling.
@bstoll
bstoll force-pushed the golangci-lint-fixes branch from 67bcff2 to ccbe258 Compare July 8, 2026 21:21
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.

3 participants