Preparing report...

Report for github.com/teachmind/Parcel-Service

A+    Excellent!    Found 14 issues across 21 files

Tweet

gofmt90%

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!


gocyclo100%

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.

No problems detected. Good job!


golint52%

Golint is a linter for Go source code.

    • Parcel-Service/internal/app/model/entities.go
    • Line 8: warning: exported type Parcel should have comment or be unexported (golint)
    • Line 24: warning: exported type CarrierRequest should have comment or be unexported (golint)
    • Line 31: warning: exported method Parcel.ValidateParcelInput should have comment or be unexported (golint)
    • Line 55: warning: comment on exported method CarrierRequest.ValidateCarrierId should be of the form "ValidateCarrierId ..." (golint)
    • Parcel-Service/internal/app/model/response.go
    • Line 7: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 8: warning: exported var ErrInvalid should have comment or be unexported (golint)
    • Line 9: warning: exported var ErrEmpty should have comment or be unexported (golint)
    • Line 10: warning: error var IntServerErr should have name of the form ErrFoo (golint)
    • Line 10: warning: exported var IntServerErr should have comment or be unexported (golint)
    • Line 12: warning: exported type GenericResponse should have comment or be unexported (golint)
    • Line 18: warning: exported type ErrorDetailsResponse should have comment or be unexported (golint)
    • Parcel-Service/internal/app/server/response.go
    • Line 18: warning: exported function SuccessResponse should have comment or be unexported (golint)
    • Line 26: warning: exported function ErrUnprocessableEntityResponse should have comment or be unexported (golint)
    • Line 30: warning: exported function ErrInvalidEntityResponse should have comment or be unexported (golint)
    • Line 34: warning: exported function ErrNotFoundResponse should have comment or be unexported (golint)
    • Line 38: warning: exported function ErrInternalServerResponse should have comment or be unexported (golint)
    • Parcel-Service/internal/pkg/postgres/db.go
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 19: warning: exported type Config should have comment or be unexported (golint)
    • Line 31: warning: exported function New should have comment or be unexported (golint)
    • Line 50: warning: exported method Config.Url should have comment or be unexported (golint)
    • Line 80: warning: exported function RunDatabaseMigration should have comment or be unexported (golint)
    • Line 94: warning: exported function RollbackLatestMigration should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign85%

IneffAssign detects ineffectual assignments in Go code.

    • Parcel-Service/internal/app/server/handler_test.go
    • Line 9: warning: package parcel-service/internal/app/service/mocks is not in GOROOT (/usr/local/go/src/parcel-service/internal/app/service/mocks) (ineffassign)
    • Line 9: warning: could not import parcel-service/internal/app/service/mocks (invalid package name: "") (ineffassign)
    • Parcel-Service/internal/app/carrier/service_test.go
    • Line 7: warning: package parcel-service/internal/app/service/mocks is not in GOROOT (/usr/local/go/src/parcel-service/internal/app/service/mocks) (ineffassign)
    • Line 7: warning: could not import parcel-service/internal/app/service/mocks (invalid package name: "") (ineffassign)
    • Parcel-Service/internal/app/parcel/service_test.go
    • Line 7: warning: package parcel-service/internal/app/service/mocks is not in GOROOT (/usr/local/go/src/parcel-service/internal/app/service/mocks) (ineffassign)
    • Line 7: warning: could not import parcel-service/internal/app/service/mocks (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!