Skip to content

Commit

Permalink
add pedantic flag
Browse files Browse the repository at this point in the history
Updates #6
  • Loading branch information
quasilyte committed Aug 27, 2018
1 parent 701d065 commit 02998a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ import (
func main() {
log.SetFlags(0)

var ctxt context

flag.BoolVar(&ctxt.Pedantic, "pedantic", false,
`makes several diagnostics more pedantic and comprehensive`)
flag.Parse()

filenames := targetsToFilenames(flag.Args())

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

Pedantic bool

Warnings []warning
}

Expand Down

0 comments on commit 02998a7

Please sign in to comment.