Preparing report...

Report for github.com/cristovaoolegario/aluraflix-api

(v1.0.12)

A+    Excellent!    Found 20 issues across 34 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!


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!


golint41%

Golint is a linter for Go source code.

    • internal/pkg/http/rest/resources/resources.go
    • Line 15: warning: exported function RespondWithError should have comment or be unexported (golint)
    • Line 19: warning: exported function RespondWithJson should have comment or be unexported (golint)
    • Line 28: warning: exported function GetQueryParams should have comment or be unexported (golint)
    • internal/tests/mocked_services/video_service_mock.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 12: warning: exported var VideoServiceMockGetAllFreeVideos should have comment or be unexported (golint)
    • Line 13: warning: exported var VideoServiceMockGetAll should have comment or be unexported (golint)
    • Line 14: warning: exported var VideoServiceMockGetById should have comment or be unexported (golint)
    • Line 15: warning: exported var VideoServiceMockCreate should have comment or be unexported (golint)
    • Line 16: warning: exported var VideoServiceMockUpdate should have comment or be unexported (golint)
    • Line 17: warning: exported var VideoServiceMockDelete should have comment or be unexported (golint)
    • Line 19: warning: exported type VideoServiceMock should have comment or be unexported (golint)
    • Line 21: warning: exported method VideoServiceMock.GetAllFreeVideos should have comment or be unexported (golint)
    • Line 24: warning: exported method VideoServiceMock.GetAll should have comment or be unexported (golint)
    • Line 28: warning: exported method VideoServiceMock.GetByID should have comment or be unexported (golint)
    • Line 32: warning: exported method VideoServiceMock.Create should have comment or be unexported (golint)
    • Line 36: warning: exported method VideoServiceMock.Update should have comment or be unexported (golint)
    • Line 40: warning: exported method VideoServiceMock.Delete should have comment or be unexported (golint)
    • internal/pkg/storage/bson/db/services/video_service.go
    • Line 16: warning: exported type VideoService should have comment or be unexported (golint)
    • Line 21: warning: exported function ProvideVideoService should have comment or be unexported (golint)
    • Line 25: warning: exported method VideoService.GetAllFreeVideos should have comment or be unexported (golint)
    • Line 38: warning: exported method VideoService.GetAll should have comment or be unexported (golint)
    • Line 50: warning: exported method VideoService.GetByID should have comment or be unexported (golint)
    • Line 58: warning: exported method VideoService.Create should have comment or be unexported (golint)
    • Line 74: warning: exported method VideoService.Update should have comment or be unexported (golint)
    • Line 89: warning: exported method VideoService.Delete should have comment or be unexported (golint)
    • internal/app/app.go
    • Line 12: warning: exported type App should have comment or be unexported (golint)
    • Line 17: warning: exported function ProvideApp should have comment or be unexported (golint)
    • Line 21: warning: exported method App.Run should have comment or be unexported (golint)
    • internal/pkg/http/rest/router.go
    • Line 5: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 14: warning: exported function ProvideRouter should have comment or be unexported (golint)
    • internal/pkg/storage/bson/db/services/db_service.go
    • Line 14: warning: exported const VideoCollection should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type DatabaseService should have comment or be unexported (golint)
    • Line 22: warning: exported function ProvideDatabaseService should have comment or be unexported (golint)
    • internal/tests/mocked_services/category_service_mock.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 12: warning: exported var CategoryServiceMockGetAll should have comment or be unexported (golint)
    • Line 13: warning: exported var CategoryServiceMockGetByID should have comment or be unexported (golint)
    • Line 14: warning: exported var CategoryServiceMockCreate should have comment or be unexported (golint)
    • Line 15: warning: exported var CategoryServiceMockUpdate should have comment or be unexported (golint)
    • Line 16: warning: exported var CategoryServiceMockDelete should have comment or be unexported (golint)
    • Line 17: warning: exported var CategoryServiceMockGetVideosByCategoryId should have comment or be unexported (golint)
    • Line 18: warning: exported var CategoryServiceMockGetFreeCategory should have comment or be unexported (golint)
    • Line 20: warning: exported type CategoryServiceMock should have comment or be unexported (golint)
    • Line 22: warning: exported method CategoryServiceMock.GetById should have comment or be unexported (golint)
    • Line 26: warning: exported method CategoryServiceMock.GetAll should have comment or be unexported (golint)
    • Line 30: warning: exported method CategoryServiceMock.Create should have comment or be unexported (golint)
    • Line 34: warning: exported method CategoryServiceMock.Update should have comment or be unexported (golint)
    • Line 38: warning: exported method CategoryServiceMock.Delete should have comment or be unexported (golint)
    • Line 42: warning: exported method CategoryServiceMock.GetVideosByCategoryId should have comment or be unexported (golint)
    • Line 46: warning: exported method CategoryServiceMock.GetFreeCategory should have comment or be unexported (golint)
    • internal/tests/mocked_data/category_mock.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 10: warning: exported function GetValidCategory should have comment or be unexported (golint)
    • Line 14: warning: exported function GetValidCategoryWithId should have comment or be unexported (golint)
    • Line 23: warning: exported function GetBsonFromCategory should have comment or be unexported (golint)
    • Line 32: warning: exported function GetInvalidInsertCategoryDto should have comment or be unexported (golint)
    • Line 38: warning: exported function GetValidInsertCategoryDto should have comment or be unexported (golint)
    • internal/tests/mocked_data/video_mock.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 10: warning: exported function GetValidVideo should have comment or be unexported (golint)
    • Line 14: warning: exported function GetValidVideoWithId should have comment or be unexported (golint)
    • Line 24: warning: exported function GetBsonFromVideo should have comment or be unexported (golint)
    • Line 34: warning: exported function GetValidInsertVideoDto should have comment or be unexported (golint)
    • Line 42: warning: exported function GetInvalidInsertVideoDto should have comment or be unexported (golint)
    • internal/pkg/storage/bson/db/services/category_service.go
    • Line 15: warning: exported type CategoryService should have comment or be unexported (golint)
    • Line 20: warning: exported function ProvideCategoryService should have comment or be unexported (golint)
    • Line 24: warning: exported method CategoryService.GetAll should have comment or be unexported (golint)
    • Line 36: warning: exported method CategoryService.GetById should have comment or be unexported (golint)
    • Line 44: warning: exported method CategoryService.Create should have comment or be unexported (golint)
    • Line 53: warning: exported method CategoryService.Update should have comment or be unexported (golint)
    • Line 68: warning: exported method CategoryService.Delete should have comment or be unexported (golint)
    • Line 76: warning: exported method CategoryService.GetVideosByCategoryId should have comment or be unexported (golint)
    • Line 87: warning: exported method CategoryService.GetFreeCategory should have comment or be unexported (golint)
    • internal/pkg/http/auth/jwt/jwt.go
    • Line 3: warning: exported type Response should have comment or be unexported (golint)
    • Line 7: warning: exported type Jwks should have comment or be unexported (golint)
    • Line 11: warning: exported type JSONWebKeys should have comment or be unexported (golint)

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!