Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix running extra linters #2388

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Mar 26, 2025

Commit 84128ce ("CI: enable extra linters for new code", PR #1040) introduced the feature of running some extra linters for any newly added code (see the commit description for motivation).

Alas, commit 13bf5e9 ("use runc cgroup creation logic", PR #936) broke the feature, because it contains:

mv .golangci-extra.yml golangci.yml

(Note the missing dot in the destination file name.)

As a result, golangci-lint was running twice with the same config.

Let's fix it by using args: action parameter.

Also, some time later, a new golangci-lint removed support for deadline
option, and commit fbedd99 ("update golangci.yml", PR #2152) fixed it
for the main config. Let's do the same for the extra config.

Commit 84128ce ("CI: enable extra linters for new code") introduced the
feature of running some extra linters for any newly added code (see the
commit description for motivation).

Commit 13bf5e9 ("use runc cgroup creation logic") broke the feature,
because it contains:

	mv .golangci-extra.yml golangci.yml

(Note the missing dot in the destination file name.)

As a result, golangci-lint was running twice with the same config,
with golangci-extra.yml being unused.

Let's fix it by using args: action parameter.

Also, some time later, a new golangci-lint removed support for deadline
option, and commit fbedd99 ("update golangci.yml") fixed it for the
main config. Let's do the same for the extra config.

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin
Copy link
Contributor Author

Tested (with an additional commit which is now removed) that the extra linter run now works as intended (see https://github.com/containers/common/actions/runs/14072720749/job/39410075389?pr=2388). It does.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

openshift-ci bot commented Mar 26, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kolyshkin, Luap99

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

@mheon
Copy link
Member

mheon commented Mar 26, 2025

Sure
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Mar 26, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 1724e1a into containers:main Mar 26, 2025
17 checks passed
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