1
0
mirror of https://github.com/golang/go synced 2024-11-05 17:46:16 -07:00

go/analysis: gofmt snippets in package documentation

Tab widths may vary, making tabs suitable for indentation but
not alignment. Use spaces for alignment instead, as gofmt does.

This improves the readability of the package comment on pkg.go.dev.

While here, also make use of blank lines more consistent: two blank
lines before a heading, and a single blank line everywhere else.

Change-Id: I6b6a67b413d02066e2ce233f09d49c1ccdf28a84
Reviewed-on: https://go-review.googlesource.com/c/tools/+/209457
Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
Dmitri Shuralyov 2019-11-30 17:56:20 -05:00
parent a0e659d513
commit 53d48bfcf5

View File

@ -3,6 +3,7 @@
The analysis package defines the interface between a modular static
analysis and an analysis driver program.
Background
A static analysis is a function that inspects a package of Go code and
@ -51,7 +52,6 @@ the go/analysis/passes/ subdirectory:
...
}
An analysis driver is a program such as vet that runs a set of
analyses and prints the diagnostics that they report.
The driver program must import the list of Analyzers it needs.
@ -330,7 +330,5 @@ entirety as:
A tool that provides multiple analyzers can use multichecker in a
similar way, giving it the list of Analyzers.
*/
package analysis