-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Copy link
Labels
github_actionsPull requests that update GitHub Actions codePull requests that update GitHub Actions code
Description
The golangci-latest CI job is currently failing with typecheck errors when running golangci-lint:
pkg/config/config.go:250:12: pattern config.toml: no matching files found (typecheck)
//go:embed config.toml
This happens because pkg/config/config.toml is generated in the config job but is not available in the golangci-latest job. As a result, the linter cannot build the package, and only-new-issues filtering does not apply.
Steps to Reproduce:
- Open a pull request that does not touch
pkg/config/config.goorpkg/config/config.toml. - Observe that
golangci-latestfails with atypecheckerror.
run golangci-lint
only new issues on pull_request: /tmp/tmp-2138-p9VgJ0wsaW17/pull.patch
Running [/home/runner/golangci-lint-2.5.0-linux-amd64/golangci-lint config path] in [/home/runner/work/cli/cli] ...
Running [/home/runner/golangci-lint-2.5.0-linux-amd64/golangci-lint config verify] in [/home/runner/work/cli/cli] ...
Running [/home/runner/golangci-lint-2.5.0-linux-amd64/golangci-lint run --new-from-patch=/tmp/tmp-2138-p9VgJ0wsaW17/pull.patch --new=false --new-from-rev= --new-from-merge-base=] in [/home/runner/work/cli/cli] ...
Error: pkg/config/config.go:250:12: pattern config.toml: no matching files found (typecheck)
//go:embed config.toml
^
1 issues:
* typecheck: 1
Error: issues found
Ran golangci-lint in 21267ms
Expected Behavior:
The golangci-latest job should run successfully and only report linter issues introduced by the PR diff.
Proposed Fix:
- Make
golangci-latestdepend on the config job. - Download the
pkg/config/config.tomlartifact into the correct path before runninggolangci-lint. - Optionally verify the file exists to avoid typecheck failures.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
github_actionsPull requests that update GitHub Actions codePull requests that update GitHub Actions code