Preparing report...

Report for github.com/MontFerret/ferret-server

A    Great!    Found 63 issues across 67 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!


gocyclo98%

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.


golint7%

Golint is a linter for Go source code.

    • ferret-server/server/db/repositories/persistence.go
    • Line 23: warning: exported type PersistenceRepository should have comment or be unexported (golint)
    • Line 28: warning: exported function NewPersistenceRepository should have comment or be unexported (golint)
    • Line 72: warning: exported method PersistenceRepository.Create should have comment or be unexported (golint)
    • Line 91: warning: exported method PersistenceRepository.Update should have comment or be unexported (golint)
    • Line 113: warning: exported method PersistenceRepository.Get should have comment or be unexported (golint)
    • Line 124: warning: exported method PersistenceRepository.Delete should have comment or be unexported (golint)
    • Line 134: warning: exported method PersistenceRepository.Find should have comment or be unexported (golint)
    • Line 179: warning: exported method PersistenceRepository.FindByScriptID should have comment or be unexported (golint)
    • ferret-server/pkg/history/service.go
    • Line 12: warning: exported type DbContext should have comment or be unexported (golint)
    • Line 16: warning: exported type Service should have comment or be unexported (golint)
    • Line 21: warning: exported function NewService should have comment or be unexported (golint)
    • Line 29: warning: exported method Service.Create should have comment or be unexported (golint)
    • Line 49: warning: exported method Service.Log should have comment or be unexported (golint)
    • Line 71: warning: exported method Service.Update should have comment or be unexported (golint)
    • Line 99: warning: exported method Service.Get should have comment or be unexported (golint)
    • Line 109: warning: exported method Service.Find should have comment or be unexported (golint)
    • ferret-server/server/controllers/execution.go
    • Line 19: warning: exported type Execution should have comment or be unexported (golint)
    • Line 24: warning: exported function NewExecution should have comment or be unexported (golint)
    • Line 36: warning: exported method Execution.Create should have comment or be unexported (golint)
    • Line 70: warning: exported method Execution.Delete should have comment or be unexported (golint)
    • Line 95: warning: exported method Execution.Find should have comment or be unexported (golint)
    • Line 147: warning: exported method Execution.Get should have comment or be unexported (golint)
    • ferret-server/server/controllers/persistence.go
    • Line 19: warning: exported type Persistence should have comment or be unexported (golint)
    • Line 23: warning: exported function NewPersistence should have comment or be unexported (golint)
    • Line 31: warning: exported method Persistence.FindAll should have comment or be unexported (golint)
    • Line 64: warning: exported method Persistence.Find should have comment or be unexported (golint)
    • Line 101: warning: exported method Persistence.Get should have comment or be unexported (golint)
    • Line 135: warning: exported method Persistence.Update should have comment or be unexported (golint)
    • Line 159: warning: exported method Persistence.Delete should have comment or be unexported (golint)
    • ferret-server/server/controllers/projects.go
    • Line 16: warning: exported type Projects should have comment or be unexported (golint)
    • Line 20: warning: exported function NewProjects should have comment or be unexported (golint)
    • Line 28: warning: exported method Projects.CreateProject should have comment or be unexported (golint)
    • Line 56: warning: exported method Projects.UpdateProject should have comment or be unexported (golint)
    • Line 87: warning: exported method Projects.DeleteProject should have comment or be unexported (golint)
    • Line 110: warning: exported method Projects.GetProject should have comment or be unexported (golint)
    • Line 141: warning: exported method Projects.FindProjects should have comment or be unexported (golint)
    • ferret-server/pkg/execution/model.go
    • Line 10: warning: comment on exported type Status should be of the form "Status ..." (with optional leading article) (golint)
    • Line 13: warning: comment on exported type Cause should be of the form "Cause ..." (with optional leading article) (golint)
    • Line 31: warning: exported type State should have comment or be unexported (golint)
    • Line 38: warning: exported type Result should have comment or be unexported (golint)
    • Line 45: warning: exported const StatusUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 74: warning: exported function NewStatus should have comment or be unexported (golint)
    • Line 90: warning: exported function NewCause should have comment or be unexported (golint)
    • ferret-server/pkg/history/writer.go
    • Line 8: warning: exported type StatusWriterFn should have comment or be unexported (golint)
    • Line 14: warning: exported function ToStatusWriter should have comment or be unexported (golint)
    • Line 26: warning: exported type LogWriterFn should have comment or be unexported (golint)
    • Line 32: warning: exported function ToLogWriter should have comment or be unexported (golint)
    • ferret-server/pkg/persistence/service.go
    • Line 15: warning: exported type DbContext should have comment or be unexported (golint)
    • Line 20: warning: exported type Service should have comment or be unexported (golint)
    • Line 25: warning: exported function NewService should have comment or be unexported (golint)
    • Line 33: warning: exported method Service.CreateRecord should have comment or be unexported (golint)
    • Line 62: warning: exported method Service.UpdateRecord should have comment or be unexported (golint)
    • Line 78: warning: exported method Service.DeleteRecord should have comment or be unexported (golint)
    • Line 94: warning: exported method Service.GetRecord should have comment or be unexported (golint)
    • Line 104: warning: exported method Service.FindScriptRecords should have comment or be unexported (golint)
    • Line 114: warning: exported method Service.FindProjectRecords should have comment or be unexported (golint)
    • ferret-server/server/db/repositories/script.go
    • Line 24: warning: exported type ScriptRepository should have comment or be unexported (golint)
    • Line 29: warning: exported function NewScriptRepository should have comment or be unexported (golint)
    • Line 60: warning: exported method ScriptRepository.Get should have comment or be unexported (golint)
    • Line 76: warning: exported method ScriptRepository.Find should have comment or be unexported (golint)
    • Line 121: warning: exported method ScriptRepository.Create should have comment or be unexported (golint)
    • Line 148: warning: exported method ScriptRepository.Update should have comment or be unexported (golint)
    • Line 171: warning: exported method ScriptRepository.Delete should have comment or be unexported (golint)
    • ferret-server/pkg/common/errors.go
    • Line 9: warning: exported var ErrMissedArgument should have comment or be unexported (golint)
    • Line 22: warning: exported type AggregatedError should have comment or be unexported (golint)
    • Line 26: warning: exported function NewAggregatedError should have comment or be unexported (golint)
    • Line 30: warning: exported method AggregatedError.Errors should have comment or be unexported (golint)
    • Line 38: warning: exported function Error should have comment or be unexported (golint)
    • Line 42: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 46: warning: exported function Errors should have comment or be unexported (golint)
    • ferret-server/pkg/history/model.go
    • Line 11: warning: comment on exported type Record should be of the form "Record ..." (with optional leading article) (golint)
    • Line 26: warning: exported type UpdateRecord should have comment or be unexported (golint)
    • Line 31: warning: exported type RecordEntity should have comment or be unexported (golint)
    • Line 36: warning: exported type QueryResult should have comment or be unexported (golint)
    • ferret-server/server/db/repositories/queries/params.go
    • Line 3: warning: exported const ParamPageOffset should have comment or be unexported (golint)
    • Line 4: warning: exported const ParamPageCount should have comment or be unexported (golint)
    • Line 5: warning: exported const ParamFilterByName should have comment or be unexported (golint)
    • Line 6: warning: exported const ParamFilterByScriptID should have comment or be unexported (golint)
    • ferret-server/server/logging/context.go
    • Line 9: warning: exported function WithContext should have comment or be unexported (golint)
    • Line 13: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 17: warning: exported function FromRequest should have comment or be unexported (golint)
    • ferret-server/pkg/execution/service.go
    • Line 18: warning: exported type DbContext should have comment or be unexported (golint)
    • Line 22: warning: exported type StateWriter should have comment or be unexported (golint)
    • Line 26: warning: exported type LogWriter should have comment or be unexported (golint)
    • Line 30: warning: exported type OutputWriter should have comment or be unexported (golint)
    • Line 34: warning: exported type Service should have comment or be unexported (golint)
    • Line 45: warning: exported function NewService should have comment or be unexported (golint)
    • Line 105: warning: exported method Service.Start should have comment or be unexported (golint)
    • Line 167: warning: exported method Service.Cancel should have comment or be unexported (golint)
    • ferret-server/pkg/scripts/service.go
    • Line 11: warning: exported type DbContext should have comment or be unexported (golint)
    • Line 15: warning: exported type Service should have comment or be unexported (golint)
    • Line 20: warning: exported function NewService should have comment or be unexported (golint)
    • Line 28: warning: exported method Service.GetScript should have comment or be unexported (golint)
    • Line 38: warning: exported method Service.FindScripts should have comment or be unexported (golint)
    • Line 48: warning: exported method Service.CreateScript should have comment or be unexported (golint)
    • Line 58: warning: exported method Service.UpdateScript should have comment or be unexported (golint)
    • Line 68: warning: exported method Service.DeleteScript should have comment or be unexported (golint)
    • ferret-server/pkg/projects/model.go
    • Line 6: warning: exported type UpdateProject should have comment or be unexported (golint)
    • Line 11: warning: exported type Project should have comment or be unexported (golint)
    • Line 15: warning: exported type ProjectEntity should have comment or be unexported (golint)
    • Line 20: warning: exported type QueryResult should have comment or be unexported (golint)
    • ferret-server/server/db/repositories/history.go
    • Line 22: warning: exported type HistoryRepository should have comment or be unexported (golint)
    • Line 27: warning: exported function NewHistoryRepository should have comment or be unexported (golint)
    • Line 70: warning: exported method HistoryRepository.Create should have comment or be unexported (golint)
    • Line 89: warning: exported method HistoryRepository.Update should have comment or be unexported (golint)
    • Line 111: warning: exported method HistoryRepository.Get should have comment or be unexported (golint)
    • Line 122: warning: exported method HistoryRepository.Find should have comment or be unexported (golint)
    • ferret-server/main.go
    • Line 13: warning: exported type Params should have comment or be unexported (golint)
    • Line 19: warning: exported method Params.Set should have comment or be unexported (golint)
    • ferret-server/pkg/execution/queue.go
    • Line 10: warning: exported type Queue should have comment or be unexported (golint)
    • Line 15: warning: exported type InMemoryQueue should have comment or be unexported (golint)
    • Line 20: warning: exported function NewInMemoryQueue should have comment or be unexported (golint)
    • Line 31: warning: exported method InMemoryQueue.Enqueue should have comment or be unexported (golint)
    • Line 42: warning: exported method InMemoryQueue.Dequeue should have comment or be unexported (golint)
    • ferret-server/pkg/common/dal/cursor.go
    • Line 9: warning: exported type Cursor should have comment or be unexported (golint)
    • Line 11: warning: exported method Cursor.IsEmpty should have comment or be unexported (golint)
    • Line 15: warning: exported method Cursor.MarshalJSON should have comment or be unexported (golint)
    • Line 23: warning: exported function EncodeCursor should have comment or be unexported (golint)
    • Line 30: warning: exported function DecodeCursor should have comment or be unexported (golint)
    • ferret-server/server/http/errors.go
    • Line 9: warning: exported function InternalError should have comment or be unexported (golint)
    • Line 19: warning: exported function NotFound should have comment or be unexported (golint)
    • Line 29: warning: exported function Bad should have comment or be unexported (golint)
    • ferret-server/server/app.go
    • Line 23: warning: exported const BYTE should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported type Application should have comment or be unexported (golint)
    • Line 42: warning: exported function New should have comment or be unexported (golint)
    • Line 121: warning: exported method Application.Run should have comment or be unexported (golint)
    • ferret-server/pkg/execution/pool.go
    • Line 11: warning: exported type Worker should have comment or be unexported (golint)
    • Line 17: warning: exported type WorkerFactory should have comment or be unexported (golint)
    • Line 19: warning: exported type WorkerPool should have comment or be unexported (golint)
    • Line 30: warning: exported function NewWorkerPool should have comment or be unexported (golint)
    • Line 60: warning: exported method WorkerPool.Consume should have comment or be unexported (golint)
    • Line 172: warning: exported method WorkerPool.Cancel should have comment or be unexported (golint)
    • ferret-server/pkg/execution/worker.go
    • Line 16: warning: exported var ErrWorkerAlreadyRunning should have comment or be unexported (golint)
    • Line 18: warning: exported type FQLWorker should have comment or be unexported (golint)
    • Line 26: warning: exported function NewFQLWorker should have comment or be unexported (golint)
    • Line 35: warning: exported method FQLWorker.IsRunning should have comment or be unexported (golint)
    • Line 42: warning: exported method FQLWorker.Process should have comment or be unexported (golint)
    • Line 90: warning: exported method FQLWorker.Interrupt should have comment or be unexported (golint)
    • ferret-server/server/http/server.go
    • Line 16: warning: exported type Server should have comment or be unexported (golint)
    • Line 23: warning: exported function New should have comment or be unexported (golint)
    • Line 44: warning: exported method Server.API should have comment or be unexported (golint)
    • Line 48: warning: exported method Server.Run should have comment or be unexported (golint)
    • ferret-server/pkg/scripts/model.go
    • Line 6: warning: exported type Identity should have comment or be unexported (golint)
    • Line 11: warning: exported type Persistence should have comment or be unexported (golint)
    • Line 15: warning: exported type Execution should have comment or be unexported (golint)
    • Line 20: warning: exported type Script should have comment or be unexported (golint)
    • Line 26: warning: exported type UpdateScript should have comment or be unexported (golint)
    • Line 31: warning: exported type ScriptEntity should have comment or be unexported (golint)
    • Line 36: warning: exported type QueryResult should have comment or be unexported (golint)
    • ferret-server/pkg/projects/service.go
    • Line 11: warning: exported type DbContext should have comment or be unexported (golint)
    • Line 15: warning: exported type Service should have comment or be unexported (golint)
    • Line 20: warning: exported function NewService should have comment or be unexported (golint)
    • Line 28: warning: exported method Service.GetProject should have comment or be unexported (golint)
    • Line 38: warning: exported method Service.FindProjects should have comment or be unexported (golint)
    • Line 48: warning: exported method Service.CreateProject should have comment or be unexported (golint)
    • Line 58: warning: exported method Service.UpdateProject should have comment or be unexported (golint)
    • Line 68: warning: exported method Service.DeleteProject should have comment or be unexported (golint)
    • ferret-server/pkg/persistence/model.go
    • Line 6: warning: exported type Record should have comment or be unexported (golint)
    • Line 13: warning: exported type RecordEntity should have comment or be unexported (golint)
    • Line 18: warning: exported type QueryResult should have comment or be unexported (golint)
    • ferret-server/server/controllers/scripts.go
    • Line 16: warning: exported type Scripts should have comment or be unexported (golint)
    • Line 20: warning: exported function NewScripts should have comment or be unexported (golint)
    • Line 28: warning: exported method Scripts.CreateScript should have comment or be unexported (golint)
    • Line 60: warning: exported method Scripts.UpdateScript should have comment or be unexported (golint)
    • Line 98: warning: exported method Scripts.DeleteScript should have comment or be unexported (golint)
    • Line 123: warning: exported method Scripts.GetScript should have comment or be unexported (golint)
    • Line 151: warning: exported method Scripts.FindScripts should have comment or be unexported (golint)
    • ferret-server/pkg/common/dal/sorting.go
    • Line 4: warning: exported type Order should have comment or be unexported (golint)
    • Line 6: warning: exported type SortingField should have comment or be unexported (golint)
    • Line 11: warning: exported type Sorting should have comment or be unexported (golint)
    • Line 17: warning: exported const OrderAsc should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported var OrderValue should have comment or be unexported (golint)
    • ferret-server/server/db/manager.go
    • Line 26: warning: exported type Manager should have comment or be unexported (golint)
    • Line 37: warning: exported function New should have comment or be unexported (golint)
    • Line 96: warning: exported method Manager.GetProjectsRepository should have comment or be unexported (golint)
    • Line 100: warning: exported method Manager.GetScriptsRepository should have comment or be unexported (golint)
    • Line 112: warning: exported method Manager.GetHistoryRepository should have comment or be unexported (golint)
    • Line 124: warning: exported method Manager.GetDataRepository should have comment or be unexported (golint)
    • ferret-server/server/db/repositories/project.go
    • Line 24: warning: exported type ProjectRepository should have comment or be unexported (golint)
    • Line 30: warning: exported function NewProjectRepository should have comment or be unexported (golint)
    • Line 61: warning: exported method ProjectRepository.Get should have comment or be unexported (golint)
    • Line 76: warning: exported method ProjectRepository.Find should have comment or be unexported (golint)
    • Line 121: warning: exported method ProjectRepository.Create should have comment or be unexported (golint)
    • Line 176: warning: exported method ProjectRepository.Update should have comment or be unexported (golint)
    • Line 199: warning: exported method ProjectRepository.Delete should have comment or be unexported (golint)
    • ferret-server/pkg/common/dal/filtering.go
    • Line 4: warning: exported type Comparator should have comment or be unexported (golint)
    • Line 6: warning: exported type LogicOperator should have comment or be unexported (golint)
    • Line 8: warning: exported type FilteringField should have comment or be unexported (golint)
    • Line 14: warning: exported type Filtering should have comment or be unexported (golint)
    • Line 21: warning: exported const ComparatorEq should have comment (or a comment on this block) or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!