Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit 40f774e

Browse files
author
Eugene Simonov
committed
Reorder cases alphabetically
1 parent 740c8ac commit 40f774e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pkg/analyzer/occurrences.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,6 @@ func (nom namedOccurrenceMap) addFromCondition(stmt *ast.IfStmt) {
195195
nom.addFromIdent(stmt.If, e.X)
196196
}
197197
}
198-
case *ast.UnaryExpr:
199-
switch e := v.X.(type) {
200-
case *ast.Ident:
201-
nom.addFromIdent(stmt.If, e)
202-
case *ast.SelectorExpr:
203-
nom.addFromIdent(stmt.If, e.X)
204-
}
205-
case *ast.Ident:
206-
nom.addFromIdent(stmt.If, v)
207198
case *ast.CallExpr:
208199
for _, a := range v.Args {
209200
switch e := a.(type) {
@@ -213,6 +204,15 @@ func (nom namedOccurrenceMap) addFromCondition(stmt *ast.IfStmt) {
213204
nom.addFromCallExpr(stmt.If, e)
214205
}
215206
}
207+
case *ast.Ident:
208+
nom.addFromIdent(stmt.If, v)
209+
case *ast.UnaryExpr:
210+
switch e := v.X.(type) {
211+
case *ast.Ident:
212+
nom.addFromIdent(stmt.If, e)
213+
case *ast.SelectorExpr:
214+
nom.addFromIdent(stmt.If, e.X)
215+
}
216216
}
217217
}
218218

0 commit comments

Comments
 (0)