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

nilaway -V doesn't work #130

Open
dolmen opened this issue Nov 22, 2023 · 1 comment
Open

nilaway -V doesn't work #130

dolmen opened this issue Nov 22, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@dolmen
Copy link

dolmen commented Nov 22, 2023

-V doesn't work. nilaway expects -V=full but this is not what is documented in online help.

$ nilaway 2>&1 | head
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
$ nilaway -V         
nilaway: unsupported flag value: -V=true (use -V=full)
$ nilaway -V=full
.../nilaway version devel comments-go-here buildID=352af786e1a1f56351527fa9a903437764e7b54d91fa9d714692ceaebe61e5e8
@yuxincs
Copy link
Contributor

yuxincs commented Nov 22, 2023

Hey!

The standalone NilAway command is using the singlechecker driver provided by the analysis framework, and these standard flags are set by the library:

https://cs.opensource.google/go/x/tools/+/master:go/analysis/internal/analysisflags/flags.go;l=207-209;drc=559c4300daa4efe55422df9bba86d125cdf1d9ef

Reading from the comments there, this looks like that it's there to satisfy go vet -V protocol.

But I agree the doc should be clearer, we should probably raise an issue for https://github.com/golang/tools

(I have read that they are revamping the driver there: golang/go#61324, which we would use in the future, then we should be able to control the flags ourselves)

@sonalmahajan15 sonalmahajan15 added the documentation Improvements or additions to documentation label Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants