Skip to content

build: add go-lint-fix Makefile target#6208

Merged
mergify[bot] merged 1 commit intoceph:develfrom
kaovilai:add-go-lint-fix-target
Mar 30, 2026
Merged

build: add go-lint-fix Makefile target#6208
mergify[bot] merged 1 commit intoceph:develfrom
kaovilai:add-go-lint-fix-target

Conversation

@kaovilai
Copy link
Copy Markdown
Contributor

Summary

  • Add go-lint-fix Makefile target that passes --fix to golangci-lint
  • Update scripts/lint-go.sh to forward additional arguments ("$@") to golangci-lint

Usage: make containerized-test TARGET=go-lint-fix

Test plan

  • make containerized-test TARGET=go-lint still works as before
  • make containerized-test TARGET=go-lint-fix auto-fixes lint issues

Note

Responses generated with Claude

Generated with Claude Code
via Happy

Copilot AI review requested due to automatic review settings March 27, 2026 12:31
@mergify mergify bot added component/build Issues and PRs related to compiling Ceph-CSI bug Something isn't working labels Mar 27, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a convenient “auto-fix” lint workflow for Go by introducing a new Makefile target and allowing scripts/lint-go.sh to forward extra CLI flags to golangci-lint.

Changes:

  • Add go-lint-fix Makefile target that runs golangci-lint with --fix
  • Update scripts/lint-go.sh to forward additional arguments ("$@") to golangci-lint

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/lint-go.sh Forwards extra CLI args to golangci-lint run to support --fix and other flags.
Makefile Adds go-lint-fix target wired to ./scripts/lint-go.sh --fix.

@nixpanic nixpanic added ci/skip/e2e skip running e2e CI jobs ci/skip/multi-arch-build skip building on multiple architectures labels Mar 27, 2026
@kaovilai kaovilai force-pushed the add-go-lint-fix-target branch 2 times, most recently from b9d0246 to 21a8fa6 Compare March 28, 2026 20:54
Copy link
Copy Markdown
Member

@nixpanic nixpanic left a comment

Choose a reason for hiding this comment

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

the new go-lint-fix make target should be marked as .PHONY.

@kaovilai
Copy link
Copy Markdown
Contributor Author

@nixpanic see line 95

@nixpanic nixpanic requested a review from a team March 30, 2026 14:48
@iPraveenParihar
Copy link
Copy Markdown
Contributor

@Mergifyio rebase

Add a go-lint-fix target that passes --fix to golangci-lint via
lint-go.sh, enabling automatic fixing of lint issues. The lint-go.sh
script now forwards any additional arguments to golangci-lint.

Usage: make containerized-test TARGET=go-lint-fix

Assisted-by: Claude (Anthropic) <noreply@anthropic.com>
Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
@ceph-csi-bot ceph-csi-bot force-pushed the add-go-lint-fix-target branch from 21a8fa6 to 32efe52 Compare March 30, 2026 15:09
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 30, 2026

rebase

✅ Branch has been successfully rebased

@mergify mergify bot added the queued label Mar 30, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 30, 2026

Merge Queue Status

  • Entered queue2026-03-30 15:09 UTC · Rule: default
  • Checks skipped · PR is already up-to-date
  • Merged2026-03-30 15:16 UTC · at 32efe52afa9599835360161463a44423279e5e07

This pull request spent 7 minutes 13 seconds in the queue, including 7 minutes running CI.

Required conditions to merge

@iPraveenParihar
Copy link
Copy Markdown
Contributor

@Mergifyio queue

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 30, 2026

queue

☑️ This pull request is already queued

@mergify mergify bot merged commit 89f093e into ceph:devel Mar 30, 2026
19 checks passed
@mergify mergify bot removed the queued label Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci/skip/e2e skip running e2e CI jobs ci/skip/multi-arch-build skip building on multiple architectures component/build Issues and PRs related to compiling Ceph-CSI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants