Preparing report...

Report for github.com/quasilyte/gogrep

(v0.0.0-20211217100115-d62eab3d6376)

A+    Excellent!    Found 10 issues across 23 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo73%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • compile.go
    • Line 946: warning: cyclomatic complexity 25 of function (*compiler).compileForStmt() is high (> 15) (gocyclo)
    • Line 312: warning: cyclomatic complexity 22 of function (*compiler).compileExpr() is high (> 15) (gocyclo)
    • Line 676: warning: cyclomatic complexity 20 of function (*compiler).compileStmt() is high (> 15) (gocyclo)
    • Line 534: warning: cyclomatic complexity 17 of function (*compiler).compileSliceExpr() is high (> 15) (gocyclo)
    • Line 768: warning: cyclomatic complexity 16 of function (*compiler).compileIfStmt() is high (> 15) (gocyclo)
    • cmd/gogrep/filters.go
    • Line 123: warning: cyclomatic complexity 21 of function isPureExpr() is high (> 15) (gocyclo)
    • Line 56: warning: cyclomatic complexity 21 of function applyFilter() is high (> 15) (gocyclo)
    • parse.go
    • Line 131: warning: cyclomatic complexity 20 of function parseDetectingNode() is high (> 15) (gocyclo)
    • match.go
    • Line 147: warning: cyclomatic complexity 412 of function (*matcher).matchNodeWithInst() is high (> 15) (gocyclo)
    • Line 611: warning: cyclomatic complexity 26 of function (*matcher).matchNodeList() is high (> 15) (gocyclo)
    • Line 767: warning: cyclomatic complexity 18 of function equalNodes() is high (> 15) (gocyclo)
    • nodetag/nodetag.go
    • Line 172: warning: cyclomatic complexity 51 of function FromString() is high (> 15) (gocyclo)
    • Line 71: warning: cyclomatic complexity 48 of function FromNode() is high (> 15) (gocyclo)

golint78%

Golint is a linter for Go source code.

    • filters/filters.go
    • Line 9: warning: exported type SpecialPredicate should have comment or be unexported (golint)
    • Line 14: warning: exported type Info should have comment or be unexported (golint)
    • Line 45: warning: exported type Expr should have comment or be unexported (golint)
    • Line 52: warning: exported type OperationsTable should have comment or be unexported (golint)
    • Line 57: warning: exported function NewOperationTable should have comment or be unexported (golint)
    • Line 69: warning: exported function Parse should have comment or be unexported (golint)
    • Line 74: warning: exported function Sprint should have comment or be unexported (golint)
    • Line 94: warning: comment on exported type Operation should be of the form "Operation ..." (with optional leading article) (golint)
    • Line 97: warning: exported method Operation.IsBuiltin should have comment or be unexported (golint)
    • Line 102: warning: exported const OpInvalid should have comment (or a comment on this block) or be unexported (golint)
    • gogrep.go
    • Line 11: warning: exported function IsEmptyNodeSlice should have comment or be unexported (golint)
    • Line 24: warning: exported type CapturedNode should have comment or be unexported (golint)
    • Line 29: warning: exported method MatchData.CapturedByName should have comment or be unexported (golint)
    • Line 36: warning: exported type MatcherState should have comment or be unexported (golint)
    • Line 46: warning: exported function NewMatcherState should have comment or be unexported (golint)
    • Line 52: warning: exported type Pattern should have comment or be unexported (golint)
    • Line 56: warning: exported type PatternInfo should have comment or be unexported (golint)
    • Line 60: warning: exported method Pattern.NodeTag should have comment or be unexported (golint)
    • Line 77: warning: exported type CompileConfig should have comment or be unexported (golint)
    • Line 94: warning: exported function Compile should have comment or be unexported (golint)
    • slices.go
    • Line 8: warning: exported type NodeSlice should have comment or be unexported (golint)
    • Line 16: warning: exported type ExprSlice should have comment or be unexported (golint)
    • Line 24: warning: exported method ExprSlice.Len should have comment or be unexported (golint)
    • Line 25: warning: exported method ExprSlice.At should have comment or be unexported (golint)
    • Line 27: warning: exported method ExprSlice.Pos should have comment or be unexported (golint)
    • Line 28: warning: exported method ExprSlice.End should have comment or be unexported (golint)
    • nodetag/nodetag.go
    • Line 7: warning: exported type Value should have comment or be unexported (golint)
    • Line 10: warning: exported const Unknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 71: warning: exported function FromNode should have comment or be unexported (golint)
    • Line 172: warning: exported function FromString should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!