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

add tip for the JSON output #266

Merged
merged 2 commits into from
Aug 21, 2024
Merged

add tip for the JSON output #266

merged 2 commits into from
Aug 21, 2024

Conversation

madneal
Copy link
Contributor

@madneal madneal commented Jul 13, 2024

This PR provides a tip when output as JSON due to the current default pretty-print flag

Current Issue

For the orginal json flag provided by checker.go, it's impossible to get analysisflags.JSON from nilaway. There is a conflict bettwen the pretty-print and json output currently due to the code

if conf.PrettyPrint {
.
As the default conf.PrettyPrint is true, so the output will be messy when try to output as json.
image

Copy link
Contributor

@sonalmahajan15 sonalmahajan15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, we had missed realizing this problem. Thanks for helping us improve the documentation!

Copy link

codecov bot commented Jul 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.60%. Comparing base (56f5ac5) to head (ae7824b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #266   +/-   ##
=======================================
  Coverage   87.60%   87.60%           
=======================================
  Files          63       63           
  Lines        7916     7916           
=======================================
  Hits         6935     6935           
  Misses        799      799           
  Partials      182      182           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@madneal
Copy link
Contributor Author

madneal commented Aug 1, 2024

@sonalmahajan15 seems some issue with the golden test

@sonalmahajan15
Copy link
Contributor

@madneal , yes, something seems to be wrong. We'll look into it and merge the PR.

@yuxincs
Copy link
Contributor

yuxincs commented Aug 21, 2024

Yeah, I think we'll have to wait for golang/go#61324 to have an importable checker API to use.

@yuxincs
Copy link
Contributor

yuxincs commented Aug 21, 2024

I'm updating your branch since we recently fixed the CI issue, and we'll need those changes in order for CI to pass :)

Copy link

Golden Test

Note

✅ NilAway errors reported on standard libraries are identical.

3271 errors on base branch (main, 56f5ac5)
3271 errors on test branch (a747e8e)

@yuxincs
Copy link
Contributor

yuxincs commented Aug 21, 2024

Thanks @madneal for the contributions!

@yuxincs yuxincs merged commit c91e71c into uber-go:main Aug 21, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants