Preparing report...

Report for github.com/Mainflux/mainflux

(v0.0.0-20220126093308-89061d33e57e)

A+    Excellent!    Found 48 issues across 473 files

Tweet

gofmt97%

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!


golint94%

Golint is a linter for Go source code.

    • pkg/sdk/go/responses.go
    • Line 49: warning: exported type GroupsPage should have comment or be unexported (golint)
    • Line 54: warning: exported type UsersPage should have comment or be unexported (golint)
    • Line 59: warning: exported type MembersPage should have comment or be unexported (golint)
    • pkg/sdk/go/groups.go
    • Line 19: warning: exported const MaxLevel should have comment (or a comment on this block) or be unexported (golint)
    • auth/groups.go
    • Line 9: warning: exported const MaxLevel should have comment or be unexported (golint)
    • Line 10: warning: exported const MinLevel should have comment or be unexported (golint)
    • Line 62: warning: exported type GroupMetadata should have comment or be unexported (golint)
    • Line 64: warning: exported type Member should have comment or be unexported (golint)
    • Line 69: warning: exported type Group should have comment or be unexported (golint)
    • Line 88: warning: exported type PageMetadata should have comment or be unexported (golint)
    • Line 99: warning: exported type GroupPage should have comment or be unexported (golint)
    • Line 104: warning: exported type MemberPage should have comment or be unexported (golint)
    • Line 109: warning: exported type GroupService should have comment or be unexported (golint)
    • Line 147: warning: exported type GroupRepository should have comment or be unexported (golint)
    • certs/certs.go
    • Line 8: warning: comment on exported type Page should be of the form "Page ..." (with optional leading article) (golint)
    • cli/config.go
    • Line 13: warning: exported type Config should have comment or be unexported (golint)
    • Line 46: warning: exported function ParseConfig should have comment or be unexported (golint)
    • logger/level.go
    • Line 22: warning: exported var ErrInvalidLogLevel should have comment or be unexported (golint)
    • provision/service.go
    • Line 15: warning: exported const Active should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported var ErrUnauthorized should have comment or be unexported (golint)
    • twins/service.go
    • Line 75: warning: exported const SubtopicWildcard should have comment (or a comment on this block) or be unexported (golint)

gocyclo97%

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.

    • provision/service.go
    • Line 100: warning: cyclomatic complexity 26 of function (*provisionService).Provision() is high (> 15) (gocyclo)
    • Line 336: warning: cyclomatic complexity 21 of function (*provisionService).recover() is high (> 15) (gocyclo)
    • users/users.go
    • Line 73: warning: cyclomatic complexity 19 of function isEmail() is high (> 15) (gocyclo)

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!