File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,20 @@ func TestTags(t *testing.T) {
54
54
}
55
55
}
56
56
57
+ func TestDocs (t * testing.T ) {
58
+ for _ , info := range lintpack .GetCheckersInfo () {
59
+ if info .Summary == "" {
60
+ t .Errorf ("%q checker lacks summary" , info .Name )
61
+ }
62
+ for key , p := range info .Params {
63
+ if p .Usage == "" {
64
+ t .Errorf ("%q checker %q param lacks usage docs" ,
65
+ info .Name , key )
66
+ }
67
+ }
68
+ }
69
+ }
70
+
57
71
func TestStableList (t * testing.T ) {
58
72
// Verify that new checker is not added without "experimental"
59
73
// tag by accident. When stable checker is about to be added,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ func init() {
14
14
var info lintpack.CheckerInfo
15
15
info .Name = "hexLiteral"
16
16
info .Tags = []string {"style" , "experimental" }
17
- info .Summary = ""
17
+ info .Summary = "Detects hex literals that have mixed case letter digits "
18
18
info .Before = `
19
19
x := 0X12
20
20
y := 0xfF`
You can’t perform that action at this time.
0 commit comments