Preparing report...

Report for github.com/cucumber/gherkin-go

A    Great!    Found 10 issues across 15 files

Tweet

gofmt93%

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


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!


golint40%

Golint is a linter for Go source code.

    • gherkin-go/astbuilder.go
    • Line 8: warning: exported type AstBuilder should have comment or be unexported (golint)
    • Line 93: warning: exported function NewAstBuilder should have comment or be unexported (golint)
    • gherkin-go/dialect.go
    • Line 3: warning: exported type GherkinDialect should have comment or be unexported (golint)
    • Line 10: warning: exported method GherkinDialect.FeatureKeywords should have comment or be unexported (golint)
    • Line 14: warning: exported method GherkinDialect.RuleKeywords should have comment or be unexported (golint)
    • Line 18: warning: exported method GherkinDialect.ScenarioKeywords should have comment or be unexported (golint)
    • Line 22: warning: exported method GherkinDialect.StepKeywords should have comment or be unexported (golint)
    • Line 31: warning: exported method GherkinDialect.BackgroundKeywords should have comment or be unexported (golint)
    • Line 35: warning: exported method GherkinDialect.ScenarioOutlineKeywords should have comment or be unexported (golint)
    • Line 39: warning: exported method GherkinDialect.ExamplesKeywords should have comment or be unexported (golint)
    • Line 43: warning: exported type GherkinDialectProvider should have comment or be unexported (golint)
    • gherkin-go/matcher.go
    • Line 11: warning: exported const DEFAULT_DIALECT should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported function NewMatcher should have comment or be unexported (golint)
    • Line 42: warning: exported function NewLanguageMatcher should have comment or be unexported (golint)
    • gherkin-go/messages.go
    • Line 12: warning: exported function Messages should have comment or be unexported (golint)
    • Line 29: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gherkin-go/parser.go
    • Line 4: warning: package comment should be of the form "Package gherkin ..." (golint)
    • Line 12: warning: exported type TokenType should have comment or be unexported (golint)
    • Line 15: warning: exported const TokenTypeNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported method TokenType.Name should have comment or be unexported (golint)
    • Line 70: warning: exported method TokenType.RuleType should have comment or be unexported (golint)
    • Line 104: warning: exported type RuleType should have comment or be unexported (golint)
    • Line 107: warning: exported const RuleTypeNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 143: warning: exported method RuleType.IsEOF should have comment or be unexported (golint)
    • Line 146: warning: exported method RuleType.Name should have comment or be unexported (golint)
    • Line 216: warning: exported type Location should have comment or be unexported (golint)
    • Line 4438: warning: exported type Matcher should have comment or be unexported (golint)
    • gherkin-go/gherkin.go
    • Line 11: warning: exported type Parser should have comment or be unexported (golint)
    • Line 27: warning: exported type Builder should have comment or be unexported (golint)
    • Line 34: warning: exported type Token should have comment or be unexported (golint)
    • Line 44: warning: exported method Token.IsEOF should have comment or be unexported (golint)
    • Line 51: warning: exported type LineSpan should have comment or be unexported (golint)
    • Line 65: warning: exported function NewParser should have comment or be unexported (golint)
    • Line 75: warning: exported function NewScanner should have comment or be unexported (golint)
    • Line 103: warning: exported type Line should have comment or be unexported (golint)
    • Line 110: warning: exported method Line.Indent should have comment or be unexported (golint)
    • Line 114: warning: exported method Line.IsEmpty should have comment or be unexported (golint)
    • Line 118: warning: exported method Line.IsEof should have comment or be unexported (golint)
    • Line 122: warning: exported method Line.StartsWith should have comment or be unexported (golint)
    • Line 126: warning: exported function ParseGherkinDocument should have comment or be unexported (golint)
    • Line 130: warning: exported function ParseGherkinDocumentForLanguage should have comment or be unexported (golint)

gocyclo80%

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.

    • gherkin-go/parser.go
    • Line 328: warning: cyclomatic complexity 52 of function (*parseContext).match() is high (> 15) (gocyclo)
    • Line 146: warning: cyclomatic complexity 33 of function (RuleType).Name() is high (> 15) (gocyclo)
    • Line 1514: warning: cyclomatic complexity 16 of function (*parseContext).matchAt15() is high (> 15) (gocyclo)
    • Line 3228: warning: cyclomatic complexity 16 of function (*parseContext).matchAt35() is high (> 15) (gocyclo)

ineffassign86%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell93%

Misspell Finds commonly misspelled English words