Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/vet: add -cgoinclude check for #include of code in subdirectories #26506
The go build model is that all code for a package is in one directory.
One of the few ways a package can violate this rule is by using
It seems reasonable for cmd/vet to notice such #includes and
Suggested in #26366.
OK, so I throw an error only when the include is in a subdir of the project, but not when it is directly in the same dir as the go file, and not when it's outside the src tree.
Got you right?
Should I throw a warning for the third case or just leave it be?