Preparing report...

Report for github.com/src-d/lookout

A+    Excellent!    Found 45 issues across 113 files

Tweet

gofmt88%

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!


golint72%

Golint is a linter for Go source code.

    • lookout/mock/services.go
    • Line 11: warning: exported type MockChangesService should have comment or be unexported (golint)
    • Line 19: warning: exported method MockChangesService.GetChanges should have comment or be unexported (golint)
    • Line 28: warning: exported type MockFilesService should have comment or be unexported (golint)
    • Line 36: warning: exported method MockFilesService.GetFiles should have comment or be unexported (golint)
    • lookout/store/http_fs_source.go
    • Line 18: warning: exported type Config should have comment or be unexported (golint)
    • Line 22: warning: exported type HttpFs should have comment or be unexported (golint)
    • Line 28: warning: exported function WithInstance should have comment or be unexported (golint)
    • Line 66: warning: exported method HttpFs.Open should have comment or be unexported (golint)
    • Line 70: warning: exported method HttpFs.Close should have comment or be unexported (golint)
    • Line 75: warning: exported method HttpFs.First should have comment or be unexported (golint)
    • Line 84: warning: exported method HttpFs.Prev should have comment or be unexported (golint)
    • Line 93: warning: exported method HttpFs.Next should have comment or be unexported (golint)
    • Line 102: warning: exported method HttpFs.ReadUp should have comment or be unexported (golint)
    • Line 116: warning: exported method HttpFs.ReadDown should have comment or be unexported (golint)
    • lookout/cmd/lookoutd/watch.go
    • Line 15: warning: exported type WatchCommand should have comment or be unexported (golint)
    • Line 21: warning: exported method WatchCommand.ExecuteContext should have comment or be unexported (golint)
    • lookout/cmd/lookoutd/work.go
    • Line 18: warning: exported type WorkCommand should have comment or be unexported (golint)
    • Line 24: warning: exported method WorkCommand.ExecuteContext should have comment or be unexported (golint)
    • lookout/cmd/dummy/main.go
    • Line 26: warning: exported type ServeCommand should have comment or be unexported (golint)
    • Line 36: warning: exported method ServeCommand.Execute should have comment or be unexported (golint)
    • lookout/service/bblfsh/bblfsh.go
    • Line 96: warning: exported type BaseScanner should have comment or be unexported (golint)
    • Line 158: warning: exported method ChangeScanner.Next should have comment or be unexported (golint)
    • Line 182: warning: exported method ChangeScanner.Err should have comment or be unexported (golint)
    • Line 190: warning: exported method ChangeScanner.Change should have comment or be unexported (golint)
    • Line 194: warning: exported method ChangeScanner.Close should have comment or be unexported (golint)
    • Line 205: warning: exported method FileScanner.Next should have comment or be unexported (golint)
    • Line 224: warning: exported method FileScanner.Err should have comment or be unexported (golint)
    • Line 232: warning: exported method FileScanner.File should have comment or be unexported (golint)
    • Line 236: warning: exported method FileScanner.Close should have comment or be unexported (golint)
    • lookout/data.go
    • Line 13: warning: exported type ChangesRequest should have comment or be unexported (golint)
    • Line 14: warning: exported type FilesRequest should have comment or be unexported (golint)
    • Line 15: warning: exported type Change should have comment or be unexported (golint)
    • Line 16: warning: exported type File should have comment or be unexported (golint)
    • Line 32: warning: exported function RegisterDataServer should have comment or be unexported (golint)
    • Line 66: warning: exported type DataServerHandler should have comment or be unexported (golint)
    • Line 73: warning: exported method DataServerHandler.GetChanges should have comment or be unexported (golint)
    • Line 104: warning: exported method DataServerHandler.GetFiles should have comment or be unexported (golint)
    • Line 133: warning: exported type DataClient should have comment or be unexported (golint)
    • Line 137: warning: exported function NewDataClient should have comment or be unexported (golint)
    • Line 143: warning: exported method DataClient.GetChanges should have comment or be unexported (golint)
    • Line 161: warning: exported method DataClient.GetFiles should have comment or be unexported (golint)
    • Line 179: warning: exported type ClientChangeScanner should have comment or be unexported (golint)
    • Line 186: warning: exported method ClientChangeScanner.Next should have comment or be unexported (golint)
    • Line 206: warning: exported method ClientChangeScanner.Err should have comment or be unexported (golint)
    • Line 210: warning: exported method ClientChangeScanner.Change should have comment or be unexported (golint)
    • Line 214: warning: exported method ClientChangeScanner.Close should have comment or be unexported (golint)
    • Line 218: warning: exported type ClientFileScanner should have comment or be unexported (golint)
    • Line 225: warning: exported method ClientFileScanner.Next should have comment or be unexported (golint)
    • Line 245: warning: exported method ClientFileScanner.Err should have comment or be unexported (golint)
    • Line 249: warning: exported method ClientFileScanner.File should have comment or be unexported (golint)
    • Line 253: warning: exported method ClientFileScanner.Close should have comment or be unexported (golint)
    • Line 268: warning: exported method FnChangeScanner.Next should have comment or be unexported (golint)
    • Line 305: warning: exported method FnChangeScanner.Err should have comment or be unexported (golint)
    • Line 313: warning: exported method FnChangeScanner.Change should have comment or be unexported (golint)
    • Line 317: warning: exported method FnChangeScanner.Close should have comment or be unexported (golint)
    • Line 332: warning: exported method FnFileScanner.Next should have comment or be unexported (golint)
    • Line 369: warning: exported method FnFileScanner.Err should have comment or be unexported (golint)
    • Line 377: warning: exported method FnFileScanner.File should have comment or be unexported (golint)
    • Line 381: warning: exported method FnFileScanner.Close should have comment or be unexported (golint)
    • lookout/store/models/statuses.go
    • Line 3: warning: exported type EventStatus should have comment or be unexported (golint)
    • Line 6: warning: exported const EventStatusNew should have comment (or a comment on this block) or be unexported (golint)
    • lookout/service/git/library.go
    • Line 23: warning: exported var ErrRepositoryExists should have comment or be unexported (golint)
    • Line 27: warning: exported type ReposCollectionHandler should have comment or be unexported (golint)
    • lookout/web/http_server.go
    • Line 11: warning: exported type HTTPServer should have comment or be unexported (golint)
    • Line 15: warning: exported function NewHTTPServer should have comment or be unexported (golint)
    • lookout/dummy/dummy.go
    • Line 15: warning: exported type Analyzer should have comment or be unexported (golint)
    • Line 24: warning: exported method Analyzer.NotifyReviewEvent should have comment or be unexported (golint)
    • Line 57: warning: exported method Analyzer.NotifyPushEvent should have comment or be unexported (golint)
    • lookout/mock/scanners.go
    • Line 5: warning: exported type SliceChangeScanner should have comment or be unexported (golint)
    • Line 12: warning: exported method SliceChangeScanner.Next should have comment or be unexported (golint)
    • Line 26: warning: exported method SliceChangeScanner.Err should have comment or be unexported (golint)
    • Line 30: warning: exported method SliceChangeScanner.Change should have comment or be unexported (golint)
    • Line 38: warning: exported method SliceChangeScanner.Close should have comment or be unexported (golint)
    • Line 42: warning: exported type SliceFileScanner should have comment or be unexported (golint)
    • Line 49: warning: exported method SliceFileScanner.Next should have comment or be unexported (golint)
    • Line 63: warning: exported method SliceFileScanner.Err should have comment or be unexported (golint)
    • Line 67: warning: exported method SliceFileScanner.File should have comment or be unexported (golint)
    • Line 75: warning: exported method SliceFileScanner.Close should have comment or be unexported (golint)
    • lookout/server/server.go
    • Line 541: warning: exported type LogPoster should have comment or be unexported (golint)
    • Line 545: warning: exported method LogPoster.Post should have comment or be unexported (golint)
    • Line 570: warning: exported method LogPoster.Status should have comment or be unexported (golint)
    • lookout/provider/github/watcher.go
    • Line 17: warning: exported const Provider should have comment or be unexported (golint)
    • Line 32: warning: exported var NoErrNotModified should have comment or be unexported (golint)
    • Line 40: warning: exported type Watcher should have comment or be unexported (golint)
    • lookout/util/cli/db.go
    • Line 10: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 19: warning: exported method DBOptions.InitDB should have comment or be unexported (golint)
    • lookout/util/cmdtest/cmds.go
    • Line 16: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 28: warning: exported type IntegrationSuite should have comment or be unexported (golint)
    • Line 120: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • lookout/analysis.go
    • Line 9: warning: exported type EventResponse should have comment or be unexported (golint)
    • Line 10: warning: exported type Comment should have comment or be unexported (golint)
    • Line 12: warning: exported type AnalyzerClient should have comment or be unexported (golint)
    • Line 13: warning: exported type AnalyzerServer should have comment or be unexported (golint)
    • Line 15: warning: exported function RegisterAnalyzerServer should have comment or be unexported (golint)
    • Line 19: warning: exported function NewAnalyzerClient should have comment or be unexported (golint)
    • lookout/service/git/loader.go
    • Line 14: warning: exported type CommitLoader should have comment or be unexported (golint)
    • Line 19: warning: exported type LibraryCommitLoader should have comment or be unexported (golint)
    • Line 24: warning: exported function NewLibraryCommitLoader should have comment or be unexported (golint)
    • Line 31: warning: exported method LibraryCommitLoader.LoadCommits should have comment or be unexported (golint)
    • Line 60: warning: exported type StorerCommitLoader should have comment or be unexported (golint)
    • Line 64: warning: exported function NewStorerCommitLoader should have comment or be unexported (golint)
    • Line 70: warning: exported method StorerCommitLoader.LoadCommits should have comment or be unexported (golint)
    • lookout/service/git/scanner.go
    • Line 37: warning: exported method TreeScanner.Next should have comment or be unexported (golint)
    • Line 68: warning: exported method TreeScanner.Err should have comment or be unexported (golint)
    • Line 72: warning: exported method TreeScanner.File should have comment or be unexported (golint)
    • Line 76: warning: exported method TreeScanner.Change should have comment or be unexported (golint)
    • Line 80: warning: exported method TreeScanner.Close should have comment or be unexported (golint)
    • Line 105: warning: exported method DiffTreeScanner.Next should have comment or be unexported (golint)
    • Line 127: warning: exported method DiffTreeScanner.Err should have comment or be unexported (golint)
    • Line 131: warning: exported method DiffTreeScanner.Change should have comment or be unexported (golint)
    • Line 138: warning: exported method DiffTreeScanner.Close should have comment or be unexported (golint)
    • lookout/cmd/lookoutd/migrate.go
    • Line 16: warning: exported type MigrateCommand should have comment or be unexported (golint)
    • Line 22: warning: exported method MigrateCommand.Execute should have comment or be unexported (golint)
    • lookout/cmd/lookoutd/serve.go
    • Line 18: warning: exported type ServeCommand should have comment or be unexported (golint)
    • Line 23: warning: exported method ServeCommand.ExecuteContext should have comment or be unexported (golint)
    • lookout/cmd/lookoutd/web.go
    • Line 22: warning: exported type WebCommand should have comment or be unexported (golint)
    • Line 47: warning: exported method WebCommand.Execute should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!