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

Summary line after completion #144

Open
ashmckenzie opened this issue Nov 29, 2023 · 4 comments
Open

Summary line after completion #144

ashmckenzie opened this issue Nov 29, 2023 · 4 comments
Labels
driver enhancement New feature or request

Comments

@ashmckenzie
Copy link

ashmckenzie commented Nov 29, 2023

A lot of analysis tools produce a summary line at the completion which shows things like how many warnings, errors etc. I feel this would be a valuable addition to improve the UX for both running by a user or in CI.

Something along the lines of:

$ nilaway ./...
--snip--

100 file(s) scanned, 9 nil panic(s) detected
@ashmckenzie
Copy link
Author

@yuxincs, this is the feature I mentioned at #133 (comment) 🙂

@mrtztg
Copy link

mrtztg commented Dec 1, 2023

I can add this feature if you accept to add. @yuxincs

@yuxincs yuxincs added the enhancement New feature or request label Dec 6, 2023
@yuxincs
Copy link
Contributor

yuxincs commented Dec 6, 2023

Hey! this would be a nice feature!

The thing is the linter driver we are using for running NilAway as a standalone checker is from go/analysis (see https://github.com/uber-go/nilaway/blob/main/cmd/nilaway/main.go), and it actually takes control of the main function such that there's not much post-processing we can do (to print this summary line for example).

Maybe there are some hacky ways to make it possible (feel free to explore @mrtztg, if you're interested), but I'm leaning towards waiting for golang/go#61324 to be available and we can use the general driver framework instead.

@ashmckenzie
Copy link
Author

ashmckenzie commented Dec 6, 2023

@yuxincs, I started looking to add the functionality but found it difficult to control the timing and placement of the summary information because of the way go/analysis is wired up as you say.

@yuxincs yuxincs added the driver label Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants