Skip to content

Commit c2fcfc4

Browse files
committed
Reorder the field position
1 parent 1faed92 commit c2fcfc4

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

cmd/gocognit/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ The struct being passed to the template is:
8686
PkgName string
8787
FuncName string
8888
Complexity int
89-
Diagnostics []Diagnostics
9089
Pos token.Position
90+
Diagnostics []Diagnostics
9191
}
9292
9393
type Diagnostic struct {

gocognit.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ type Stat struct {
1616
PkgName string
1717
FuncName string
1818
Complexity int
19-
Diagnostics []Diagnostic `json:",omitempty"`
2019
Pos token.Position
20+
Diagnostics []Diagnostic `json:",omitempty"`
2121
}
2222

2323
// Diagnostic contrains information how the complexity increase.
@@ -194,8 +194,6 @@ type complexityVisitor struct {
194194
elseNodes map[ast.Node]bool
195195
calculatedExprs map[ast.Expr]bool
196196

197-
fset *token.FileSet
198-
199197
diagnosticEnabled bool
200198
diagnostics []diagnostic
201199
}

0 commit comments

Comments
 (0)