tools/go/analysis
Alan Donovan 8e5aba0a36 go/analysis: harmonize flags across all checkers
The -json and -c=N flags, formerly belonging only to the
go/packages-based {single,multi}checkers, are now supported by
unitchecker as well.

The no-op -source, -v, -all, and -tags flags, formerly belonging only
to unitchecker, have moved to the analysisflags package, which is
common to all checkers.

The -flags flag now reports all registered flags (except the
{single,multi}checker-only debugging flags) rather than just those
related to analyzers, allowing one to say: 'go vet -json' or 'go vet -c=1'.

The code for printing diagnostics, either plain or in JSON, has been
factored and moved into the common analysisflags package.

This CL depends on https://go-review.googlesource.com/c/go/+/149960 to
cmd/go, which causes 'go vet' to populate the ID field of the *.cfg.
This field is used as a key in the JSON tree.

Added basic tests of the new -json and -c unitchecker flags.

Change-Id: Ia7a3a9adc86de067de060732d2c200c58be3945a
Reviewed-on: https://go-review.googlesource.com/c/150038
Reviewed-by: Michael Matloob <matloob@golang.org>
2018-11-16 19:20:06 +00:00
..
analysistest go/analysis/cmd/analyze: install all analyzers 2018-10-19 17:03:54 +00:00
cmd go/analysis: harmonize flags across all checkers 2018-11-16 19:20:06 +00:00
internal go/analysis: harmonize flags across all checkers 2018-11-16 19:20:06 +00:00
multichecker go/analysis/unitchecker: a main function for vet-lite tools 2018-11-15 16:00:22 +00:00
passes go/analysis/passes/printf: fix regression in "recursive stringer" logic 2018-11-15 16:22:56 +00:00
singlechecker go/analysis/unitchecker: a main function for vet-lite tools 2018-11-15 16:00:22 +00:00
unitchecker go/analysis: harmonize flags across all checkers 2018-11-16 19:20:06 +00:00
analysis.go go/analysis: write package documentation 2018-10-08 17:31:26 +00:00
doc.go go/analysis: doc updates 2018-11-15 15:56:33 +00:00
validate.go go/analysis: validate: report duplicates among analyzers (roots) 2018-10-11 19:55:00 +00:00