Skip to content

Conversation

@Elbehery
Copy link
Member

@Elbehery
Copy link
Member Author

@ahrtr there is also another formatting tool (i.e. gci) which offers more options, but for our purpose goimports should be fine

Please let me know if you want to add gci as well

Also I have added a step to all workflows to run golangci-lint explicitly.

As it is defined in the reusable workflow, i expected it to be running by default, but looks like it was not the case

@Elbehery
Copy link
Member Author

Now I have to use gci, because goimports can not run as a rule within the linter 🤔

@Elbehery Elbehery force-pushed the 20250615_add_goimport_golangci-lint branch from 136fc0f to 52025a1 Compare June 15, 2025 19:18
@Elbehery Elbehery force-pushed the 20250615_add_goimport_golangci-lint branch 2 times, most recently from 290f94e to efab19d Compare June 15, 2025 19:33
Signed-off-by: Mustafa Elbehery <[email protected]>
@Elbehery Elbehery force-pushed the 20250615_add_goimport_golangci-lint branch from efab19d to 55e2494 Compare June 15, 2025 19:51
@ahrtr ahrtr requested a review from ivanvc June 16, 2025 08:47
Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

LGTM & thx

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, Elbehery, fuweid

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

The pull request process is described here

Needs approval from an approver in each of these files:

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

@ahrtr ahrtr merged commit 092ee98 into etcd-io:main Jun 18, 2025
18 checks passed
@Elbehery Elbehery deleted the 20250615_add_goimport_golangci-lint branch June 18, 2025 11:13
@ivanvc
Copy link
Member

ivanvc commented Jun 19, 2025

I think it would be cleaner if rather than running the linter in every workflow, we ran it along with #986. That way, we can lint all the platform-specific files.

@Elbehery
Copy link
Member Author

I think it would be cleaner if rather than running the linter in every workflow, we ran it along with #986. That way, we can lint all the platform-specific files.

+1, I have initially had it running, but yesterday @ahrtr suggested to remove it

@ahrtr
Copy link
Member

ahrtr commented Jun 19, 2025

I think it would be cleaner if rather than running the linter in every workflow, we ran it along with #986. That way, we can lint all the platform-specific files.

Agreed, please feel free to enhance it in followup PR, thx

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

Development

Successfully merging this pull request may close these issues.

Enforce golang imports rules in CI workflow

5 participants