-
-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nogo: ignore generated source files (#3216)
Under GoCompilePkg actions, there are several ways that source files could have been modified / generated that is out of end users control: - go_test would generate an '_empty.go' file for the missing internal/external package to compile it. - coverage instrumentation would rewrite test source files with a wrapper source file that collects coverage data into a determined variable. - CGO usage would transform the original source files into several output Go and C source files with `go tool cgo ...` Implement a mechanism to ignore the generated source files for the first 2 cases and instruct static analyzers to run over the original source files wherever applicable. This provides a better default for rules_go users as static analysis errors over these generated files are outside of their control and thus, could not be fixed. Add a note regarding the CGO case for future investigations.
- Loading branch information
Showing
6 changed files
with
50 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters