Skip to content

CMP-4464: Add fmt-check target to gate CI on Go formatting#1300

Open
rhmdnd wants to merge 1 commit into
ComplianceAsCode:masterfrom
rhmdnd:fail-on-gofmt-drift
Open

CMP-4464: Add fmt-check target to gate CI on Go formatting#1300
rhmdnd wants to merge 1 commit into
ComplianceAsCode:masterfrom
rhmdnd:fail-on-gofmt-drift

Conversation

@rhmdnd

@rhmdnd rhmdnd commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Add a fmt-check target that fails if any Go source files need
formatting. The build, run, test-unit, and test-coverage targets
now depend on fmt-check instead of fmt, so CI rejects unformatted
code. The existing fmt target is unchanged so contributors can
still auto-fix formatting with make fmt.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Add a fmt-check target that fails if any Go source files need
formatting. The build, run, test-unit, and test-coverage targets
now depend on fmt-check instead of fmt, so CI rejects unformatted
code. The existing fmt target is unchanged so contributors can
still auto-fix formatting with make fmt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot

Copy link
Copy Markdown
Collaborator

@rhmdnd: This pull request references CMP-4464 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Add a fmt-check target that fails if any Go source files need
formatting. The build, run, test-unit, and test-coverage targets
now depend on fmt-check instead of fmt, so CI rejects unformatted
code. The existing fmt target is unchanged so contributors can
still auto-fix formatting with make fmt.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from jhrozek and mrogers950 July 7, 2026 11:21
@openshift-ci openshift-ci Bot added the approved label Jul 7, 2026
@rhmdnd rhmdnd requested review from Vincent056, taimurhafeez and yuumasato and removed request for jhrozek and mrogers950 July 7, 2026 11:21
@openshift-ci

openshift-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown

@rhmdnd: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/unit 6c98d14 link true /test unit
ci/prow/e2e-aws-serial 6c98d14 link true /test e2e-aws-serial
ci/prow/images 6c98d14 link true /test images
ci/prow/e2e-aws-parallel 6c98d14 link true /test e2e-aws-parallel

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@rhmdnd

rhmdnd commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

#1292 needs to land to fix current gofmt drift before this will pass.

@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhmdnd, taimurhafeez

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [rhmdnd,taimurhafeez]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants