Preparing report...

Report for github.com/ISKalsi/leet-scrape

A+    Excellent!    Found 27 issues across 37 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!


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.


golint27%

Golint is a linter for Go source code.

    • leet-scrape/data/service/file_writer.go
    • Line 10: warning: exported type FileWriter should have comment or be unexported (golint)
    • Line 12: warning: exported function NewFileWriter should have comment or be unexported (golint)
    • Line 16: warning: exported method FileWriter.WriteDataToFile should have comment or be unexported (golint)
    • leet-scrape/internal/mock/datasource/graphql_api.go
    • Line 8: warning: exported type GraphQLApi should have comment or be unexported (golint)
    • Line 12: warning: exported method GraphQLApi.FetchBySlug should have comment or be unexported (golint)
    • Line 19: warning: exported method GraphQLApi.FetchByNumber should have comment or be unexported (golint)
    • Line 26: warning: exported method GraphQLApi.FetchDailyChallengesOfMonth should have comment or be unexported (golint)
    • leet-scrape/api/query.go
    • Line 11: warning: exported const GraphqlApiUrl should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported type Query should have comment or be unexported (golint)
    • Line 17: warning: exported const Question should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported function GetQuery should have comment or be unexported (golint)
    • leet-scrape/data/repo/problem.go
    • Line 14: warning: exported type Problem should have comment or be unexported (golint)
    • Line 19: warning: exported function NewProblem should have comment or be unexported (golint)
    • Line 23: warning: exported method Problem.GetByName 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)
    • Line 36: warning: exported method Problem.GetByUrl should have comment or be unexported (golint)
    • Line 48: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 62: warning: exported method Problem.GetByNumber should have comment or be unexported (golint)
    • Line 70: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 74: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 80: warning: exported method Problem.GetDailyChallenge should have comment or be unexported (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • leet-scrape/internal/mock/problem_scrapper.go
    • Line 8: warning: exported type ProblemScrapper should have comment or be unexported (golint)
    • Line 12: warning: exported method ProblemScrapper.GetByName should have comment or be unexported (golint)
    • Line 19: warning: exported method ProblemScrapper.GetByUrl should have comment or be unexported (golint)
    • Line 26: warning: exported method ProblemScrapper.GetByNumber should have comment or be unexported (golint)
    • leet-scrape/data/datasource/web_scraper.go
    • Line 8: warning: exported type WebScrapper should have comment or be unexported (golint)
    • Line 12: warning: exported type WebScrapperImpl should have comment or be unexported (golint)
    • Line 16: warning: exported function NewWebScrapperImpl should have comment or be unexported (golint)
    • Line 20: warning: exported method WebScrapperImpl.ScrapeNameOfDailyChallenge should have comment or be unexported (golint)
    • leet-scrape/data/datasource/graphql_api.go
    • Line 10: warning: exported type GraphQLApi should have comment or be unexported (golint)
    • Line 16: warning: exported type GraphQLApiImpl should have comment or be unexported (golint)
    • Line 20: warning: exported function NewGraphQLApiImpl should have comment or be unexported (golint)
    • Line 24: warning: exported method GraphQLApiImpl.FetchBySlug should have comment or be unexported (golint)
    • Line 34: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 39: warning: exported method GraphQLApiImpl.FetchByNumber should have comment or be unexported (golint)
    • Line 54: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 59: warning: exported method GraphQLApiImpl.FetchDailyChallengesOfMonth should have comment or be unexported (golint)
    • Line 70: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • leet-scrape/domain/usecase/generate_question.go
    • Line 11: warning: exported type GenerateQuestionFile should have comment or be unexported (golint)
    • Line 23: warning: exported function NewGenerateQuestionFile should have comment or be unexported (golint)
    • Line 32: warning: exported method GenerateQuestionFile.Execute should have comment or be unexported (golint)
    • leet-scrape/internal/errors/errors.go
    • Line 4: warning: exported const InvalidURL should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported type Error should have comment or be unexported (golint)
    • Line 31: warning: exported method Error.GetCode should have comment or be unexported (golint)
    • Line 35: warning: exported method Error.GetMessage should have comment or be unexported (golint)
    • leet-scrape/domain/usecase/generate_solution.go
    • Line 11: warning: exported type GenerateSolutionFile should have comment or be unexported (golint)
    • Line 20: warning: exported function NewGenerateSolutionFile should have comment or be unexported (golint)
    • Line 31: warning: exported method GenerateSolutionFile.Execute should have comment or be unexported (golint)
    • leet-scrape/internal/mock/repo/problem.go
    • Line 8: warning: exported type Problem should have comment or be unexported (golint)
    • Line 12: warning: exported method Problem.GetDailyChallenge should have comment or be unexported (golint)
    • Line 19: warning: exported method Problem.GetByName should have comment or be unexported (golint)
    • Line 26: warning: exported method Problem.GetByUrl should have comment or be unexported (golint)
    • Line 33: warning: exported method Problem.GetByNumber should have comment or be unexported (golint)
    • leet-scrape/data/service/image_downloader.go
    • Line 12: warning: exported type ImageDownloader should have comment or be unexported (golint)
    • Line 14: warning: exported function NewImageDownloader should have comment or be unexported (golint)
    • Line 18: warning: exported method ImageDownloader.DownloadImageFromUrl should have comment or be unexported (golint)
    • leet-scrape/domain/usecase/get_problem.go
    • Line 18: warning: exported type GetProblem should have comment or be unexported (golint)
    • Line 26: warning: exported function NewGetProblemByName should have comment or be unexported (golint)
    • Line 34: warning: exported function NewGetProblemByNumber should have comment or be unexported (golint)
    • Line 42: warning: exported function NewGetProblemByUrl should have comment or be unexported (golint)
    • Line 50: warning: exported function NewGetDailyChallenge should have comment or be unexported (golint)
    • Line 57: warning: exported method GetProblem.Execute 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!