Preparing report...

Report for github.com/agext/regexp

A+    Excellent!    Found 12 issues across 22 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!


gocyclo45%

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.

    • regexp/exec_test.go
    • Line 344: warning: cyclomatic complexity 35 of function testFowler() is high (> 15) (gocyclo)
    • Line 70: warning: cyclomatic complexity 34 of function testRE2() is high (> 15) (gocyclo)
    • regexp/exec.go
    • Line 398: warning: cyclomatic complexity 32 of function (*Regexp).doOnePass() is high (> 15) (gocyclo)
    • Line 261: warning: cyclomatic complexity 22 of function (*machine).step() is high (> 15) (gocyclo)
    • Line 176: warning: cyclomatic complexity 20 of function (*machine).match() is high (> 15) (gocyclo)
    • Line 318: warning: cyclomatic complexity 16 of function (*machine).add() is high (> 15) (gocyclo)
    • regexp/syntax/parse.go
    • Line 701: warning: cyclomatic complexity 57 of function Parse() is high (> 15) (gocyclo)
    • Line 405: warning: cyclomatic complexity 38 of function (*parser).factor() is high (> 15) (gocyclo)
    • Line 1244: warning: cyclomatic complexity 35 of function (*parser).parseEscape() is high (> 15) (gocyclo)
    • Line 1532: warning: cyclomatic complexity 29 of function (*parser).parseClass() is high (> 15) (gocyclo)
    • Line 947: warning: cyclomatic complexity 21 of function (*parser).parsePerlFlags() is high (> 15) (gocyclo)
    • Line 1459: warning: cyclomatic complexity 19 of function (*parser).parseUnicodeClass() is high (> 15) (gocyclo)
    • Line 108: warning: cyclomatic complexity 17 of function (*parser).push() is high (> 15) (gocyclo)
    • regexp/syntax/regexp.go
    • Line 116: warning: cyclomatic complexity 47 of function writeRegexp() is high (> 15) (gocyclo)
    • Line 63: warning: cyclomatic complexity 26 of function (*Regexp).Equal() is high (> 15) (gocyclo)

golint77%

Golint is a linter for Go source code.

    • regexp/syntax/parse.go
    • Line 29: warning: comment on exported const ErrInternalError should be of the form "ErrInternalError ..." (golint)
    • Line 32: warning: comment on exported const ErrInvalidCharClass should be of the form "ErrInvalidCharClass ..." (golint)
    • Line 34: warning: exported const ErrInvalidCharRange should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported const FoldCase should have comment (or a comment on this block) or be unexported (golint)
    • regexp/syntax/prog.go
    • Line 27: warning: exported const InstAlt should have comment (or a comment on this block) or be unexported (golint)
    • Line 65: warning: exported const EmptyBeginLine should have comment (or a comment on this block) or be unexported (golint)
    • regexp/syntax/regexp.go
    • Line 39: warning: exported const OpNoMatch should have comment (or a comment on this block) or be unexported (golint)
    • Line 246: warning: receiver name re should be consistent with previous receiver name x for Regexp (golint)
    • Line 293: warning: receiver name re should be consistent with previous receiver name x for Regexp (golint)
    • Line 307: warning: receiver name re should be consistent with previous receiver name x for Regexp (golint)
    • Line 313: warning: receiver name re should be consistent with previous receiver name x for Regexp (golint)
    • regexp/onepass.go
    • Line 243: warning: don't use underscores in Go names; var p_A_Other should be pAOther (golint)
    • Line 244: warning: don't use underscores in Go names; var p_A_Alt should be pAAlt (golint)
    • Line 262: warning: don't use underscores in Go names; var p_B_Alt should be pBAlt (golint)
    • Line 263: warning: don't use underscores in Go names; var p_B_Other should be pBOther (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign86%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!