Skip to content

Commit 02998a7

Browse files
committed
add pedantic flag
Updates #6
1 parent 701d065 commit 02998a7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ import (
1414
func main() {
1515
log.SetFlags(0)
1616

17+
var ctxt context
18+
19+
flag.BoolVar(&ctxt.Pedantic, "pedantic", false,
20+
`makes several diagnostics more pedantic and comprehensive`)
1721
flag.Parse()
1822

1923
filenames := targetsToFilenames(flag.Args())
2024

21-
var ctxt context
2225
ctxt.SetupOpsTable()
2326
if err := visitFiles(&ctxt, filenames, ctxt.InferConventions); err != nil {
2427
log.Fatalf("infer conventions: %v", err)
@@ -37,6 +40,8 @@ type context struct {
3740
ops []*operation
3841
fset *token.FileSet
3942

43+
Pedantic bool
44+
4045
Warnings []warning
4146
}
4247

0 commit comments

Comments
 (0)