containerd / containerd/project-checks
File header checker does not allow multi-line build constraints
- Dominant language
- Shell
- Stars
- 6
- Forks
- 11
- Avg merge
- 22d 21h
- Merged PRs (30d)
- 1
Description
In https://github.com/containerd/containerd/pull/7033#discussion_r893034728, 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)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.