go/go/analysis
André Martins 73b12cab25 go/analysis/passes/structtag: ignore warning if tag should be ignored
Having a private field with a json tag does not necessary means the
field needs to be exposed publicly. This change ignores the warning of
such fields that contain a json tag with the field tag "-".

The lines added in the unit tests will fail without these changes with
the error:
```
a/a.go:36:2: unexpected diagnostic: struct field b has json tag but is not exported
```

Change-Id: Ife987b99c264ae3b60a702e43a1f9c778f8c2d62
Reviewed-on: https://go-review.googlesource.com/c/tools/+/245857
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-08-10 15:05:53 +00:00
..
analysistest go/analysis/analysistest: support testing mutually exclusive suggested fixes 2020-04-27 21:46:58 +00:00
doc all: fix more typos 2019-09-11 15:13:14 +00:00
internal go/analysis/internal/checker: don't filter facts of parameters 2020-06-09 16:44:05 +00:00
multichecker Revert "go/packages: temporarily disable some tests running on go tip with -race" 2019-10-28 14:32:39 +00:00
passes go/analysis/passes/structtag: ignore warning if tag should be ignored 2020-08-10 15:05:53 +00:00
singlechecker go/analysis/singlechecker: append a newline after "Flags:" 2020-03-12 17:39:32 +00:00
unitchecker go/analysis/unitchecker: add erroras analysis to align with go vet 2019-11-11 15:48:04 +00:00
analysis.go internal/lsp: add support for type error analyzers 2020-03-27 17:27:16 +00:00
diagnostic.go go/analysis, internal/lsp: add support for related information 2019-10-21 19:00:55 +00:00
doc.go go/analysis: suggest to users how to associate diagnostics with severities 2020-06-05 17:09:33 +00:00
validate.go go/analysis: remove requirement for unique Analyzer names 2019-10-16 18:38:41 +00:00