Preparing report...

Report for github.com/stts-se/pronlex

A+    Excellent!    Found 45 issues across 84 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!


gocyclo65%

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.

    • pronlex/dbapi/dbapi_sqlite.go
    • Line 1129: warning: cyclomatic complexity 42 of function (sqliteDBIF).lookUpTx() is high (> 15) (gocyclo)
    • Line 726: warning: cyclomatic complexity 33 of function (sqliteDBIF).insertEntries() is high (> 15) (gocyclo)
    • Line 1496: warning: cyclomatic complexity 25 of function (sqliteDBIF).updateEntryTx() is high (> 15) (gocyclo)
    • Line 1763: warning: cyclomatic complexity 17 of function (sqliteDBIF).updateEntryTag() is high (> 15) (gocyclo)
    • pronlex/dbapi/entrytag_sqlite_test.go
    • Line 157: warning: cyclomatic complexity 27 of function TestEntryTag2Sqlite() is high (> 15) (gocyclo)
    • Line 11: warning: cyclomatic complexity 25 of function TestEntryTag1Sqlite() is high (> 15) (gocyclo)
    • Line 315: warning: cyclomatic complexity 18 of function TestMultipleTags1Sqlite() is high (> 15) (gocyclo)
    • pronlex/dbapi/dbapi_mariadb.go
    • Line 997: warning: cyclomatic complexity 42 of function (mariaDBIF).lookUpTx() is high (> 15) (gocyclo)
    • Line 589: warning: cyclomatic complexity 33 of function (mariaDBIF).insertEntries() is high (> 15) (gocyclo)
    • Line 1350: warning: cyclomatic complexity 25 of function (mariaDBIF).updateEntryTx() is high (> 15) (gocyclo)
    • Line 1616: warning: cyclomatic complexity 17 of function (mariaDBIF).updateEntryTag() is high (> 15) (gocyclo)
    • pronlex/dbapi/dbapi_sqlite_test.go
    • Line 49: warning: cyclomatic complexity 101 of function TestSqliteinsertEntries() is high (> 15) (gocyclo)
    • Line 671: warning: cyclomatic complexity 18 of function TestSqliteImportLexiconFileWithDupLines() is high (> 15) (gocyclo)
    • Line 1106: warning: cyclomatic complexity 17 of function TestSqliteUpdateComments() is high (> 15) (gocyclo)
    • pronlex/dbapi/io.go
    • Line 31: warning: cyclomatic complexity 23 of function importLexiconFile() is high (> 15) (gocyclo)
    • Line 209: warning: cyclomatic complexity 22 of function ValidateLexiconFile() is high (> 15) (gocyclo)
    • pronlex/dbapi/dbapi_mariadb_test.go
    • Line 54: warning: cyclomatic complexity 99 of function Test_insertEntries() is high (> 15) (gocyclo)
    • Line 655: warning: cyclomatic complexity 16 of function Test_ImportLexiconFileWithDupLines() is high (> 15) (gocyclo)

golint75%

Golint is a linter for Go source code.

    • pronlex/validation/validation.go
    • Line 41: warning: exported function ToString should have comment or be unexported (golint)
    • Line 55: warning: exported method Validator.NumberOfTests should have comment or be unexported (golint)
    • Line 60: warning: exported method Validator.AllTests should have comment or be unexported (golint)
    • pronlex/validation/validation_test.go
    • Line 28: warning: don't use underscores in Go names; func test_processTransRe should be testProcessTransRe (golint)
    • Line 74: warning: don't use underscores in Go names; func test_createEntry should be testCreateEntry (golint)
    • Line 91: warning: don't use underscores in Go names; func test_createEntries should be testCreateEntries (golint)
    • Line 126: warning: don't use underscores in Go names; func test_createValidator should be testCreateValidator (golint)
    • Line 199: warning: don't use underscores in Go names; func test_createValidatorForTestingTestSuite should be testCreateValidatorForTestingTestSuite (golint)
    • Line 245: warning: don't use underscores in Go names; func test_createValidatorForTestingTestSuite_Invalid should be testCreateValidatorForTestingTestSuiteInvalid (golint)
    • Line 309: warning: don't use underscores in Go names; func test_createInvalidEntries should be testCreateInvalidEntries (golint)
    • pronlex/dbapi/dbif.go
    • Line 9: warning: comment on exported type DBIF should be of the form "DBIF ..." (with optional leading article) (golint)
    • Line 86: warning: exported type DBEngine should have comment or be unexported (golint)
    • Line 89: warning: exported const Sqlite should have comment (or a comment on this block) or be unexported (golint)
    • pronlex/cmd/decompounder/lexfile2decomps/lexfile2decomps.go
    • Line 14: warning: exported function SvNSTCharCanMatch should have comment or be unexported (golint)
    • Line 27: warning: exported function SvNSTSplitTrans should have comment or be unexported (golint)
    • Line 45: warning: exported function SvNSTTransAlign should have comment or be unexported (golint)
    • Line 62: warning: comment on exported function SvNSTDecompTransAlign should be of the form "SvNSTDecompTransAlign ..." (golint)
    • pronlex/validation/rules/inits.go
    • Line 9: warning: exported function NewRequiredTransRe should have comment or be unexported (golint)
    • Line 24: warning: exported function NewIllegalTransRe should have comment or be unexported (golint)
    • Line 39: warning: exported function NewRequiredOrthRe should have comment or be unexported (golint)
    • Line 54: warning: exported function NewIllegalOrthRe should have comment or be unexported (golint)
    • Line 69: warning: exported function NewRequiredTagRe should have comment or be unexported (golint)
    • Line 84: warning: exported function NewIllegalTagRe should have comment or be unexported (golint)
    • pronlex/dbapi/io.go
    • Line 25: warning: comment on exported function ImportMariaDBLexiconFile should be of the form "ImportMariaDBLexiconFile ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.

    • pronlex/dbapi/preferred_sqlite_test.go
    • Line 158: warning: ineffectual assignment to seenTag1 (ineffassign)
    • Line 159: warning: ineffectual assignment to seenTag2 (ineffassign)
    • Line 163: warning: ineffectual assignment to seenTag1 (ineffassign)
    • Line 167: warning: ineffectual assignment to seenTag2 (ineffassign)
    • Line 204: warning: ineffectual assignment to seenTag1 (ineffassign)
    • Line 205: warning: ineffectual assignment to seenTag2 (ineffassign)
    • Line 209: warning: ineffectual assignment to seenTag1 (ineffassign)
    • Line 213: warning: ineffectual assignment to seenTag2 (ineffassign)
    • pronlex/dbapi/preferred_mariadb_test.go
    • Line 133: warning: ineffectual assignment to seenTag1 (ineffassign)
    • Line 134: warning: ineffectual assignment to seenTag2 (ineffassign)
    • Line 138: warning: ineffectual assignment to seenTag1 (ineffassign)
    • Line 142: warning: ineffectual assignment to seenTag2 (ineffassign)
    • Line 179: warning: ineffectual assignment to seenTag1 (ineffassign)
    • Line 180: warning: ineffectual assignment to seenTag2 (ineffassign)
    • Line 184: warning: ineffectual assignment to seenTag1 (ineffassign)
    • Line 188: warning: ineffectual assignment to seenTag2 (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!