Skip to content

Conversation

@djdongjin
Copy link
Member

@djdongjin djdongjin commented Feb 18, 2025

The new golangci-lint action upgrade enabled golangci-lint config verification (from release note in #11397):

v6.5.0
What's Changed
Changes
feat: verify with the JSONSchema by default by @​ldez in [golangci/golangci-lint-action#1171]

That exposed a bug in our config where issues.exclude-dirs was put as linters-settings.exclude-dirs by accident:
https://github.com/containerd/containerd/actions/runs/13380233408/job/37367383920?pr=11397

jsonschema: "linters-settings" does not validate with "/properties/linters-settings/additionalProperties": additional properties 'exclude-dirs' not allowed
Failed executing command with error: the configuration contains invalid elements

The change was initially introduced in #10188 which also mentioned issues.exclude-dirs should be the correct path:

WARN [config_reader] The configuration option `run.skip-dirs` is deprecated, please use `issues.exclude-dirs`.

Signed-off-by: Jin Dong <djdongjin95@gmail.com>
@dosubot dosubot bot added the area/github_actions Pull requests that update GitHub Actions code label Feb 18, 2025
@djdongjin
Copy link
Member Author

I think we should cherrypick it release/2.0 since the exclude-dirs is basically not taking effect there as well.

release/1.7 has a similar issue. I made a separate PR (#11400) for it instead of cherrypick, because in 1.7 we're still using the deprecated skip-dirs.

@djdongjin
Copy link
Member Author

cc @ktock

@djdongjin djdongjin changed the title Fix golangci lint by moving exclude-dirs to issues.exclude-dirs Move linters-settings.exclude-dirs to issues.exclude-dirs in golangci-lint config Feb 18, 2025
@djdongjin
Copy link
Member Author

/retest

1 similar comment
@djdongjin
Copy link
Member Author

/retest

Copy link
Member

@ktock ktock left a comment

Choose a reason for hiding this comment

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

Thanks

@djdongjin
Copy link
Member Author

/retest

@mxpv mxpv added this pull request to the merge queue Feb 18, 2025
Merged via the queue into containerd:main with commit 568e396 Feb 18, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/github_actions Pull requests that update GitHub Actions code size/S

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants