You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
settings.XXXXX is indeed defined in a source file with "//go:build $flagname" statement declared at the first line
The golangci-lint has the build-flag option while nilaway's analyzer deprecated it
user% ./nilaway --help
nilaway: Run NilAway on this package to report any possible flows of nil values to erroneous sites that our system can detect
Usage: nilaway [-flag] [package]
Flags:
-V print version and exit
-all
no effect (deprecated)
-c int
display offending line with this many lines of context (default -1)
-cpuprofile string
write CPU profile to this file
-debug string
debug flags, any subset of "fpstv"
-exclude-errors-in-files string
A comma-separated list of file prefixes to exclude from error reporting. This takes precedence over include-errors-in-files.
-exclude-file-docstrings value
Comma-separated list of docstrings to exclude from analysis
-exclude-pkgs value
Comma-separated list of packages to exclude from analysis
-fix
apply all suggested fixes
-flags
print analyzer flags in JSON
-include-errors-in-files string
A comma-separated list of file prefixes to report errors, default is current working directory. (default "/Users/tiger/Downloads/working/nilaway")
-include-pkgs value
Comma-separated list of packages to analyze
-json
emit JSON output
-memprofile string
write memory profile to this file
-pretty-print value
Pretty print the error messages
-source
no effect (deprecated)
-tags string
no effect (deprecated)
-test
indicates whether test files should be analyzed, too (default true)
-trace string
write trace log to this file
-v no effect (deprecated)
Any suggestion for this issue? Thanks~
The text was updated successfully, but these errors were encountered:
Here it seems that the singlechecker does not have proper support for build tags and we have very little control over that since singlechecker takes the entire main function entry away and handles the package loading logic (other than writing our own linter driver of course). There has been golang/go#61324 that tries to implement an importable checker driver API, which would provide some flexibilities to configure the package loader. We are waiting for that to be available.
In the meantime, we can also hack around to see if it's possible to fix this (feel free to do so yourself and send a PR 😃 ). I'm keeping this issue open to track this.
I tried running nilaway cmd for our internal project, but it failed with the following error
settings.XXXXX is indeed defined in a source file with "//go:build $flagname" statement declared at the first line
The golangci-lint has the build-flag option while nilaway's analyzer deprecated it
Any suggestion for this issue? Thanks~
The text was updated successfully, but these errors were encountered: