Preparing report...

Report for github.com/infinitbyte/gopa

A+    Excellent!    Found 45 issues across 69 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!


gocyclo86%

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.


golint40%

Golint is a linter for Go source code.

    • gopa/ui/handler.go
    • Line 14: warning: exported type AdminUI should have comment or be unexported (golint)
    • Line 18: warning: exported method AdminUI.TasksPageAction should have comment or be unexported (golint)
    • Line 41: warning: exported method AdminUI.TaskViewPageAction should have comment or be unexported (golint)
    • Line 60: warning: exported method AdminUI.GetScreenshotAction should have comment or be unexported (golint)
    • gopa/pipeline/joints/filter/extract.go
    • Line 30: warning: exported type ExtractJoint should have comment or be unexported (golint)
    • Line 34: warning: exported method ExtractJoint.Name should have comment or be unexported (golint)
    • Line 40: warning: exported method ExtractJoint.Process should have comment or be unexported (golint)
    • gopa/pipeline/joints/filter/ignore_timeout.go
    • Line 27: warning: exported method IgnoreTimeoutJoint.Name should have comment or be unexported (golint)
    • Line 33: warning: exported type IgnoreTimeoutJoint should have comment or be unexported (golint)
    • Line 37: warning: exported method IgnoreTimeoutJoint.Process should have comment or be unexported (golint)
    • gopa/pipeline/joints/filter/save_fs.go
    • Line 31: warning: exported type SaveSnapshotToFileSystemJoint should have comment or be unexported (golint)
    • Line 35: warning: exported method SaveSnapshotToFileSystemJoint.Name should have comment or be unexported (golint)
    • Line 39: warning: exported method SaveSnapshotToFileSystemJoint.Process should have comment or be unexported (golint)
    • gopa/pipeline/joints/output/save_task.go
    • Line 30: warning: exported type SaveTaskJoint should have comment or be unexported (golint)
    • Line 38: warning: exported method SaveTaskJoint.IsCreate should have comment or be unexported (golint)
    • Line 43: warning: exported method SaveTaskJoint.Name should have comment or be unexported (golint)
    • Line 47: warning: exported method SaveTaskJoint.Process should have comment or be unexported (golint)
    • Line 72: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gopa/model/project.go
    • Line 42: warning: exported function CreateProject should have comment or be unexported (golint)
    • Line 50: warning: exported function UpdateProject should have comment or be unexported (golint)
    • Line 56: warning: exported function DeleteProject should have comment or be unexported (golint)
    • Line 61: warning: exported function GetProject should have comment or be unexported (golint)
    • Line 75: warning: exported function GetProjectList should have comment or be unexported (golint)
    • gopa/model/task.go
    • Line 12: warning: exported const TaskCreated should have comment or be unexported (golint)
    • Line 13: warning: exported const TaskFailed should have comment or be unexported (golint)
    • Line 14: warning: exported const TaskSuccess should have comment or be unexported (golint)
    • Line 15: warning: exported const Task404 should have comment or be unexported (golint)
    • Line 16: warning: exported const TaskRedirected should have comment or be unexported (golint)
    • Line 17: warning: exported const TaskTimeout should have comment or be unexported (golint)
    • Line 18: warning: exported const TaskDuplicated should have comment or be unexported (golint)
    • Line 19: warning: exported const TaskInterrupted should have comment or be unexported (golint)
    • Line 20: warning: exported const TaskPendingFetch should have comment or be unexported (golint)
    • Line 21: warning: exported const TaskFetchFailed should have comment or be unexported (golint)
    • Line 29: warning: exported function GetTaskStatusText should have comment or be unexported (golint)
    • Line 55: warning: exported function NewTask should have comment or be unexported (golint)
    • Line 64: warning: exported type Task should have comment or be unexported (golint)
    • Line 98: warning: exported const CONTEXT_TASK_ID should have comment (or a comment on this block) or be unexported (golint)
    • Line 100: warning: don't use underscores in Go names; const CONTEXT_TASK_Reference should be CONTEXTTASKReference (golint)
    • Line 101: warning: don't use underscores in Go names; const CONTEXT_TASK_Depth should be CONTEXTTASKDepth (golint)
    • Line 102: warning: don't use underscores in Go names; const CONTEXT_TASK_Breadth should be CONTEXTTASKBreadth (golint)
    • Line 103: warning: don't use underscores in Go names; const CONTEXT_TASK_Host should be CONTEXTTASKHost (golint)
    • Line 104: warning: don't use underscores in Go names; const CONTEXT_TASK_Schema should be CONTEXTTASKSchema (golint)
    • Line 105: warning: don't use underscores in Go names; const CONTEXT_TASK_OriginalUrl should be CONTEXTTASKOriginalURL (golint)
    • Line 106: warning: don't use underscores in Go names; const CONTEXT_TASK_Status should be CONTEXTTASKStatus (golint)
    • Line 107: warning: don't use underscores in Go names; const CONTEXT_TASK_Message should be CONTEXTTASKMessage (golint)
    • Line 108: warning: don't use underscores in Go names; const CONTEXT_TASK_Created should be CONTEXTTASKCreated (golint)
    • Line 109: warning: don't use underscores in Go names; const CONTEXT_TASK_Updated should be CONTEXTTASKUpdated (golint)
    • Line 110: warning: don't use underscores in Go names; const CONTEXT_TASK_LastFetch should be CONTEXTTASKLastFetch (golint)
    • Line 111: warning: don't use underscores in Go names; const CONTEXT_TASK_LastCheck should be CONTEXTTASKLastCheck (golint)
    • Line 112: warning: don't use underscores in Go names; const CONTEXT_TASK_NextCheck should be CONTEXTTASKNextCheck (golint)
    • Line 113: warning: don't use underscores in Go names; const CONTEXT_TASK_SnapshotID should be CONTEXTTASKSnapshotID (golint)
    • Line 114: warning: don't use underscores in Go names; const CONTEXT_TASK_SnapshotSimHash should be CONTEXTTASKSnapshotSimHash (golint)
    • Line 115: warning: don't use underscores in Go names; const CONTEXT_TASK_SnapshotHash should be CONTEXTTASKSnapshotHash (golint)
    • Line 116: warning: don't use underscores in Go names; const CONTEXT_TASK_SnapshotCreated should be CONTEXTTASKSnapshotCreated (golint)
    • Line 117: warning: don't use underscores in Go names; const CONTEXT_TASK_SnapshotVersion should be CONTEXTTASKSnapshotVersion (golint)
    • Line 118: warning: don't use underscores in Go names; const CONTEXT_TASK_LastScreenshotID should be CONTEXTTASKLastScreenshotID (golint)
    • Line 119: warning: don't use underscores in Go names; const CONTEXT_TASK_PipelineConfigID should be CONTEXTTASKPipelineConfigID (golint)
    • Line 120: warning: don't use underscores in Go names; const CONTEXT_TASK_Cookies should be CONTEXTTASKCookies (golint)
    • Line 122: warning: don't use underscores in Go names; const CONTEXT_SNAPSHOT_ContentType should be CONTEXTSNAPSHOTContentType (golint)
    • Line 125: warning: exported function CreateTask should have comment or be unexported (golint)
    • Line 145: warning: exported function UpdateTask should have comment or be unexported (golint)
    • Line 155: warning: exported function DeleteTask should have comment or be unexported (golint)
    • Line 165: warning: exported function GetTask should have comment or be unexported (golint)
    • Line 181: warning: exported function GetTaskByField should have comment or be unexported (golint)
    • Line 198: warning: exported function GetTaskByFieldAndStatus should have comment or be unexported (golint)
    • Line 217: warning: error should be the last type when returning multiple items (golint)
    • Line 217: warning: exported function GetTaskStatus should have comment or be unexported (golint)
    • Line 221: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 226: warning: error should be the last type when returning multiple items (golint)
    • Line 226: warning: exported function GetHostStatus should have comment or be unexported (golint)
    • Line 229: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 234: warning: exported function GetTaskList should have comment or be unexported (golint)
    • Line 261: warning: exported function GetPendingNewFetchTasks should have comment or be unexported (golint)
    • Line 282: warning: exported function GetFailedTasks should have comment or be unexported (golint)
    • Line 304: warning: exported function GetPendingUpdateFetchTasks should have comment or be unexported (golint)
    • gopa/pipeline/joints/filter/fetch.go
    • Line 39: warning: exported type FetchJoint should have comment or be unexported (golint)
    • Line 44: warning: exported method FetchJoint.Name should have comment or be unexported (golint)
    • Line 54: warning: exported method FetchJoint.Process should have comment or be unexported (golint)
    • gopa/pipeline/joints/filter/hash.go
    • Line 28: warning: exported type HashJoint should have comment or be unexported (golint)
    • Line 32: warning: exported method HashJoint.Name should have comment or be unexported (golint)
    • Line 36: warning: exported method HashJoint.Process should have comment or be unexported (golint)
    • gopa/config/generated.go
    • Line 3: warning: exported const LastCommitLog should have comment or be unexported (golint)
    • Line 4: warning: exported const BuildDate should have comment or be unexported (golint)
    • Line 6: warning: exported const Version should have comment or be unexported (golint)
    • gopa/model/domain.go
    • Line 19: warning: exported type Domain should have comment or be unexported (golint)
    • Line 27: warning: exported type Url should have comment or be unexported (golint)
    • Line 37: warning: exported type FetchTask should have comment or be unexported (golint)
    • Line 45: warning: exported method FetchTask.UpdateStatus should have comment or be unexported (golint)
    • Line 51: warning: exported const StagePreFetch should have comment or be unexported (golint)
    • Line 52: warning: exported const StageFetch should have comment or be unexported (golint)
    • Line 53: warning: exported const StageAfterFetch should have comment or be unexported (golint)
    • Line 55: warning: exported const PreFetchPendingCheck should have comment or be unexported (golint)
    • Line 56: warning: exported const PreFetchCheck should have comment or be unexported (golint)
    • Line 57: warning: exported const PreFetchChecking should have comment or be unexported (golint)
    • Line 58: warning: exported const PreFetchCheckError should have comment or be unexported (golint)
    • gopa/plugins/chrome/joint/chrome_fetch.go
    • Line 49: warning: exported type ChromeFetchV2Joint should have comment or be unexported (golint)
    • Line 69: warning: exported method ChromeFetchV2Joint.Name should have comment or be unexported (golint)
    • Line 73: warning: context.Context should be the first parameter of a function (golint)
    • Line 94: warning: exported method ChromeFetchV2Joint.Process should have comment or be unexported (golint)
    • gopa/static/static.go
    • Line 47: warning: exported method StaticFS.Open should have comment or be unexported (golint)
    • Line 77: warning: exported type StaticFS should have comment or be unexported (golint)
    • gopa/api/task_handler.go
    • Line 63: warning: exported method API.TaskUpdateAction should have comment or be unexported (golint)
    • Line 63: warning: receiver name api should be consistent with previous receiver name handler for API (golint)
    • Line 117: warning: comment on exported method API.CreateTaskAction should be of the form "CreateTaskAction ..." (golint)
    • gopa/pipeline/joints/filter/update_check_time.go
    • Line 29: warning: exported type UpdateCheckTimeJoint should have comment or be unexported (golint)
    • Line 38: warning: exported method UpdateCheckTimeJoint.Name should have comment or be unexported (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 42: warning: exported method UpdateCheckTimeJoint.Process should have comment or be unexported (golint)
    • Line 42: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • gopa/config/const.go
    • Line 8: warning: exported const FetchChannel should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported const TaskBucketKey should have comment or be unexported (golint)
    • Line 22: warning: exported const StatsBucketKey should have comment or be unexported (golint)
    • Line 23: warning: exported const SnapshotBucketKey should have comment or be unexported (golint)
    • Line 24: warning: exported const ScreenshotBucketKey should have comment or be unexported (golint)
    • Line 25: warning: exported const SnapshotMappingBucketKey should have comment or be unexported (golint)
    • Line 27: warning: exported const ErrorExitedPipeline should have comment or be unexported (golint)
    • Line 28: warning: exported const ErrorBrokenPipeline should have comment or be unexported (golint)
    • Line 30: warning: exported const STATS_FETCH_TOTAL_COUNT should have comment or be unexported (golint)
    • Line 31: warning: exported const STATS_FETCH_SUCCESS_COUNT should have comment or be unexported (golint)
    • Line 32: warning: exported const STATS_FETCH_FAIL_COUNT should have comment or be unexported (golint)
    • Line 33: warning: exported const STATS_FETCH_TIMEOUT_COUNT should have comment or be unexported (golint)
    • Line 34: warning: exported const STATS_FETCH_TIMEOUT_IGNORE_COUNT should have comment or be unexported (golint)
    • Line 36: warning: exported const STATS_STORAGE_FILE_SIZE should have comment or be unexported (golint)
    • Line 37: warning: exported const STATS_STORAGE_FILE_COUNT should have comment or be unexported (golint)
    • gopa/api/snapshot_handler.go
    • Line 21: warning: should not use dot imports (golint)
    • Line 26: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 31: warning: exported method API.SnapshotAction should have comment or be unexported (golint)
    • Line 31: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 63: warning: exported method API.SnapshotListAction should have comment or be unexported (golint)
    • Line 63: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 87: warning: exported method API.SnapshotGetAction should have comment or be unexported (golint)
    • Line 87: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 99: warning: exported method API.SnapshotGetPayloadAction should have comment or be unexported (golint)
    • Line 99: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • gopa/pipeline/joints/output/error_task.go
    • Line 25: warning: exported type ErrorTaskJoint should have comment or be unexported (golint)
    • Line 29: warning: exported method ErrorTaskJoint.Name should have comment or be unexported (golint)
    • Line 33: warning: exported method ErrorTaskJoint.Process should have comment or be unexported (golint)
    • Line 53: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gopa/model/host_config.go
    • Line 27: warning: exported type HostConfig should have comment or be unexported (golint)
    • Line 41: warning: exported function CreateHostConfig should have comment or be unexported (golint)
    • Line 49: warning: exported function UpdateHostConfig should have comment or be unexported (golint)
    • Line 55: warning: exported function DeleteHostConfig should have comment or be unexported (golint)
    • Line 60: warning: exported function GetHostConfigByID should have comment or be unexported (golint)
    • Line 66: warning: exported function GetHostConfigList should have comment or be unexported (golint)
    • Line 83: warning: exported function GetHostConfig should have comment or be unexported (golint)
    • Line 107: warning: exported function GetHostConfigByHostAndUrl should have comment or be unexported (golint)
    • gopa/plugins/dispatch/dispatch.go
    • Line 19: warning: exported type DispatchConfig should have comment or be unexported (golint)
    • Line 85: warning: comment on exported method DispatchModule.Setup should be of the form "Setup ..." (golint)
    • Line 100: warning: exported method DispatchModule.Start should have comment or be unexported (golint)
    • gopa/ui/search/common/func.go
    • Line 26: warning: exported function SafeGetField should have comment or be unexported (golint)
    • Line 33: warning: exported function SmartGetField should have comment or be unexported (golint)
    • Line 45: warning: exported function GetBucketLabel should have comment or be unexported (golint)
    • Line 52: warning: exported function GetBucketKey should have comment or be unexported (golint)
    • Line 59: warning: exported function GetNavBlock should have comment or be unexported (golint)
    • gopa/pipeline/joints/filter/parse.go
    • Line 33: warning: exported type ParsePageJoint should have comment or be unexported (golint)
    • Line 45: warning: exported method ParsePageJoint.Name should have comment or be unexported (golint)
    • Line 49: warning: exported method ParsePageJoint.Process should have comment or be unexported (golint)
    • gopa/pipeline/joints/filter/save_snapshot.go
    • Line 30: warning: exported type SaveSnapshotToDBJoint should have comment or be unexported (golint)
    • Line 38: warning: exported method SaveSnapshotToDBJoint.Name should have comment or be unexported (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 42: warning: exported method SaveSnapshotToDBJoint.Process should have comment or be unexported (golint)
    • Line 42: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • gopa/api/host_handler.go
    • Line 94: warning: exported method API.GetHostConfigsAction should have comment or be unexported (golint)
    • Line 94: warning: receiver name api should be consistent with previous receiver name handler for API (golint)
    • Line 116: warning: exported method API.CreateHostConfigAction should have comment or be unexported (golint)
    • Line 116: warning: receiver name api should be consistent with previous receiver name handler for API (golint)
    • Line 140: warning: exported method API.GetHostConfigAction should have comment or be unexported (golint)
    • Line 140: warning: receiver name api should be consistent with previous receiver name handler for API (golint)
    • Line 152: warning: exported method API.UpdateHostConfigAction should have comment or be unexported (golint)
    • Line 152: warning: receiver name api should be consistent with previous receiver name handler for API (golint)
    • Line 178: warning: exported method API.DeleteHostConfigAction should have comment or be unexported (golint)
    • Line 178: warning: receiver name api should be consistent with previous receiver name handler for API (golint)
    • gopa/pipeline/joints/filter/html_to_text.go
    • Line 30: warning: exported type HtmlToTextJoint should have comment or be unexported (golint)
    • Line 38: warning: exported method HtmlToTextJoint.Name should have comment or be unexported (golint)
    • Line 170: warning: exported method HtmlToTextJoint.Process should have comment or be unexported (golint)
    • gopa/pipeline/joints/filter/parse_pdf.go
    • Line 28: warning: exported type ParsePDFJoint should have comment or be unexported (golint)
    • Line 32: warning: exported method ParsePDFJoint.Name should have comment or be unexported (golint)
    • Line 38: warning: exported method ParsePDFJoint.Process should have comment or be unexported (golint)
    • Line 94: warning: exported function ParsePDF2Text should have comment or be unexported (golint)
    • gopa/plugins/tools_generator/generator.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 5: warning: should not use dot imports (golint)
    • Line 14: warning: exported type GeneratorPlugin should have comment or be unexported (golint)
    • Line 17: warning: exported method GeneratorPlugin.Name should have comment or be unexported (golint)
    • Line 26: warning: exported method GeneratorPlugin.Setup should have comment or be unexported (golint)
    • Line 32: warning: exported method GeneratorPlugin.Start should have comment or be unexported (golint)
    • Line 59: warning: exported method GeneratorPlugin.Stop should have comment or be unexported (golint)
    • gopa/ui/tasks/func.go
    • Line 60: warning: exported function GetStatusCount should have comment or be unexported (golint)
    • Line 68: warning: exported function GetActive should have comment or be unexported (golint)
    • gopa/ui/search/handler.go
    • Line 31: warning: exported method UserUI.GetSearchClient should have comment or be unexported (golint)
    • Line 45: warning: exported method UserUI.AJAXMoreItemAction should have comment or be unexported (golint)
    • Line 218: warning: exported method UserUI.SuggestAction should have comment or be unexported (golint)
    • Line 304: warning: exported method UserUI.GetSnapshotPayloadAction should have comment or be unexported (golint)
    • gopa/api/project_handler.go
    • Line 27: warning: exported method API.GetProjectsAction should have comment or be unexported (golint)
    • Line 48: warning: exported method API.CreateProjectAction should have comment or be unexported (golint)
    • Line 72: warning: exported method API.GetProjectAction should have comment or be unexported (golint)
    • Line 84: warning: exported method API.UpdateProjectAction should have comment or be unexported (golint)
    • Line 110: warning: exported method API.DeleteProjectAction should have comment or be unexported (golint)
    • Line 121: warning: exported method API.EnableProjectAction should have comment or be unexported (golint)
    • gopa/plugins/chrome/chrome.go
    • Line 6: warning: should not use dot imports (golint)
    • Line 13: warning: exported type ChromePlugin should have comment or be unexported (golint)
    • Line 16: warning: exported method ChromePlugin.Name should have comment or be unexported (golint)
    • Line 23: warning: exported method ChromePlugin.Setup should have comment or be unexported (golint)
    • Line 55: warning: exported method ChromePlugin.Start should have comment or be unexported (golint)
    • Line 59: warning: exported method ChromePlugin.Stop should have comment or be unexported (golint)
    • gopa/model/snapshot.go
    • Line 27: warning: exported type KV should have comment or be unexported (golint)
    • Line 32: warning: exported type LinkGroup should have comment or be unexported (golint)
    • Line 37: warning: exported type Snapshot should have comment or be unexported (golint)
    • Line 90: warning: exported type PageLink should have comment or be unexported (golint)
    • Line 95: warning: exported function CreateSnapshot should have comment or be unexported (golint)
    • Line 99: warning: exported function DeleteSnapshot should have comment or be unexported (golint)
    • Line 103: warning: exported function GetSnapshotList should have comment or be unexported (golint)
    • Line 123: warning: exported function GetSnapshotByField should have comment or be unexported (golint)
    • Line 140: warning: exported function GetSnapshot should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words