Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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](https://github.com/golang/tools/blob/0e7ccc0478c322a6b32fb9f74ebfc42e4f965ee9/go/analysis/internal/checker/checker.go#L510), 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 https://github.com/uber-go/nilaway/blob/e90288479601315af13b7fdd3ccd6b50c53a8e7c/nilaway.go#L43. As the default `conf.PrettyPrint ` is true, so the output will be messy when try to output as json. <img width="1303" alt="image" src="https://github.com/uber-go/nilaway/assets/12164075/4b199a3b-7151-43a8-ba88-12052859ad00"> Co-authored-by: Yuxin Wang <[email protected]>
- Loading branch information