-
-
Notifications
You must be signed in to change notification settings - Fork 669
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: provide a way to ignore external cgo source #3619
Comments
#3770 does not exclude any cgo sources from being fed into nogo, I don't think it would fix this issue. |
With #3995, the output becomes:
Based on that, I would assume that the PR fixes this issue. @emmaxy Could you confirm that? |
**What type of PR is this?** Feature **What does this PR do? Why is it needed?** `nogo` is run in a separate action that can be toggled with `--run_validations`. This avoids rerunning compilation if the `nogo` tool changes and also allows to collect `nogo` findings of targets that depend on other targets that themselves have `nogo` findings (with `--keep_going`). **Which issues(s) does this PR fix?** Fixes #3619 Fixes #3695 Fixes #3846 Closes #3707 **Other notes for review** --------- Co-authored-by: Zhongpeng Lin <[email protected]>
What version of rules_go are you using?
v0.40.1
What version of gazelle are you using?
Irrelevant
What version of Bazel are you using?
6.2.1
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Darwin / ARM64
Any other potentially useful information about your toolchain?
N/A
What did you do?
We have a dependency over
github.com/shirou/gopsutil/v3/process
package.When enable
copylocks
analyzer by including"@org_golang_x_tools//go/analysis/passes/copylock:go_default_library"
innogo
config, the code fail to compile.We have already set
nogo_config.json
withHowever, the
cgo
source path does not includeexternal
and therefore, escaped the current regex.We also want to avoid specific regex like this
Even though it works, it might be harder to maintain.
What did you expect to see?
If possible, external
cgo
sources should be included intonogo
withexternal
inside the source path.This would allow us to ignore those files using existing regex.
What did you see instead?
Note how
rules_go_work-1366086039/cgo/github.com/shirou/gopsutil/v3/process/process.go
does not contain external inside.The text was updated successfully, but these errors were encountered: