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

Package-level comments for static analyzers #7332

Merged
merged 2 commits into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tools/analyzers/comparesame/analyzer.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Package comparesame implements a static analyzer to ensure that code does not contain
// comparisons of identical expressions.
package comparesame

import (
Expand All @@ -13,7 +15,7 @@ import (
)

// Doc explaining the tool.
const Doc = "Tool to detect comparison (==, !=, >=, <=, >, <) of identical boolean expressions."
const Doc = "Tool to detect comparison (==, !=, >=, <=, >, <) of identical expressions."

const messageTemplate = "Boolean expression has identical expressions on both sides. The result is always %v."

Expand Down
2 changes: 2 additions & 0 deletions tools/analyzers/cryptorand/analyzer.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Package cryptorand implements a static analyzer to ensure that the crypto/rand package is used
// for randomness throughout the codebase.
package cryptorand

import (
Expand Down
1 change: 1 addition & 0 deletions tools/analyzers/featureconfig/analyzer.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package featureconfig implements a static analyzer to prevent leaking globals in tests.
package featureconfig

import (
Expand Down
1 change: 1 addition & 0 deletions tools/analyzers/maligned/analyzer.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package maligned implements a static analyzer to ensure that Go structs take up the least possible memory.
package maligned

import (
Expand Down
1 change: 1 addition & 0 deletions tools/analyzers/nop/analyzer.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Package nop implements a static analyzer to ensure that code does not contain no-op instructions.
package nop

import (
Expand Down
2 changes: 2 additions & 0 deletions tools/analyzers/shadowpredecl/analyzer.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Package shadowpredecl implements a static analyzer which disallows declaring constructs
// that shadow predeclared Go identifiers by having the same name.
package shadowpredecl

import (
Expand Down