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

File header checker does not allow multi-line build constraints #5

Open
samuelkarp opened this issue Jun 9, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@samuelkarp
Copy link
Member

In containerd/containerd#7033 (comment), I suggested a constraint of //go:build (linux || windows || darwin) && !no_cri. In the old syntax, that expands to:

// +build linux windows darwin
// +build !no_cri

When used together for compatibility, this results in a three-line build constraint section prior to the file header:

//go:build (linux || windows || darwin) && !no_cri
// +build linux windows darwin
// +build !no_cri

This causes the file headers check to fail:

2022-06-09T17:02:11.9823766Z ##[group]Run echo "::group::📚 File headers"
2022-06-09T17:02:11.9824087Z �[36;1mecho "::group::📚 File headers"�[0m
2022-06-09T17:02:11.9824517Z �[36;1m/home/runner/work/_actions/containerd/project-checks/v1/script/validate/fileheader /home/runner/work/_actions/containerd/project-checks/v1/�[0m
2022-06-09T17:02:11.9824914Z �[36;1mecho "::endgroup::"�[0m

(https://github.com/containerd/containerd/runs/6817382535)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants