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

nogo: ignore generated source files #3216

Merged
merged 1 commit into from
Jul 6, 2022

Commits on Jun 28, 2022

  1. nogo: ignore generated source files

    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.
    sluongng committed Jun 28, 2022
    Configuration menu
    Copy the full SHA
    1ce1832 View commit details
    Browse the repository at this point in the history