Preparing report...

Report for github.com/grofers/go-codon

C    Needs some work    Found 23 issues across 24 files

Tweet

gofmt20%

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!


gocyclo95%

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.


golint16%

Golint is a linter for Go source code.

    • go-codon/compliance/clients/mock/client/operations/operations_client.go
    • Line 10: warning: exported function New should have comment or be unexported (golint)
    • Line 14: warning: exported type Client should have comment or be unexported (golint)
    • Line 17: warning: exported type GetMockOK should have comment or be unexported (golint)
    • Line 21: warning: exported type GetMockError should have comment or be unexported (golint)
    • Line 29: warning: exported method Client.GetSuccess should have comment or be unexported (golint)
    • Line 29: warning: don't use underscores in Go names; method parameter all_params should be allParams (golint)
    • Line 32: warning: don't use underscores in Go names; var wait_val should be waitVal (golint)
    • Line 45: warning: exported method Client.GetFailure should have comment or be unexported (golint)
    • Line 45: warning: don't use underscores in Go names; method parameter all_params should be allParams (golint)
    • Line 49: warning: exported method Client.GetFailurePayload should have comment or be unexported (golint)
    • Line 49: warning: don't use underscores in Go names; method parameter all_params should be allParams (golint)
    • go-codon/runtime/config/config.go
    • Line 11: warning: exported type Config should have comment or be unexported (golint)
    • Line 16: warning: exported method Config.GetEndpoint should have comment or be unexported (golint)
    • Line 17: warning: don't use underscores in Go names; var endpoint_cfg should be endpointCfg (golint)
    • Line 19: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 24: warning: exported method Config.GetConstant should have comment or be unexported (golint)
    • Line 27: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 32: warning: exported method Config.GetConstantPath should have comment or be unexported (golint)
    • Line 33: warning: don't use underscores in Go names; var path_s should be pathS (golint)
    • Line 39: warning: don't use underscores in Go names; var obj_t should be objT (golint)
    • Line 48: warning: exported method Config.MustGetConstant should have comment or be unexported (golint)
    • Line 56: warning: exported method Config.MustGetConstantPath should have comment or be unexported (golint)
    • Line 64: warning: exported var YmlConfig should have comment or be unexported (golint)
    • Line 66: warning: exported function ReadYmlConfig should have comment or be unexported (golint)
    • Line 121: warning: exported function GetEndpoint should have comment or be unexported (golint)
    • Line 125: warning: exported function GetConstant should have comment or be unexported (golint)
    • Line 129: warning: exported function MustGetConstant should have comment or be unexported (golint)
    • Line 133: warning: exported function MustGetConstantPath should have comment or be unexported (golint)
    • go-codon/flowgen/generator/options.go
    • Line 7: warning: exported type GenOpts should have comment or be unexported (golint)
    • Line 13: warning: exported method GenOpts.EnsureDefaults should have comment or be unexported (golint)
    • Line 26: warning: exported method GenOpts.Verify should have comment or be unexported (golint)
    • go-codon/compliance/workflows_test.go
    • Line 18: warning: don't use underscores in Go names; var var_map should be varMap (golint)
    • Line 19: warning: don't use underscores in Go names; var var_map_c should be varMapC (golint)
    • Line 20: warning: don't use underscores in Go names; var result_i should be resultI (golint)
    • Line 30: warning: don't use underscores in Go names; var var_map should be varMap (golint)
    • Line 36: warning: don't use underscores in Go names; var var_map_c should be varMapC (golint)
    • Line 37: warning: don't use underscores in Go names; var result_i should be resultI (golint)
    • Line 47: warning: don't use underscores in Go names; var var_map should be varMap (golint)
    • Line 48: warning: don't use underscores in Go names; var var_map_c should be varMapC (golint)
    • Line 49: warning: don't use underscores in Go names; var result_i should be resultI (golint)
    • Line 59: warning: don't use underscores in Go names; var assert_map should be assertMap (golint)
    • Line 63: warning: don't use underscores in Go names; var var_map should be varMap (golint)
    • Line 64: warning: don't use underscores in Go names; var result_i should be resultI (golint)
    • Line 74: warning: don't use underscores in Go names; var assert_map should be assertMap (golint)
    • Line 78: warning: don't use underscores in Go names; var var_map should be varMap (golint)
    • Line 79: warning: don't use underscores in Go names; var result_i should be resultI (golint)
    • Line 89: warning: don't use underscores in Go names; var assert_map should be assertMap (golint)
    • Line 95: warning: don't use underscores in Go names; var var_map should be varMap (golint)
    • Line 96: warning: don't use underscores in Go names; var result_i should be resultI (golint)
    • Line 106: warning: don't use underscores in Go names; var assert_map should be assertMap (golint)
    • Line 112: warning: don't use underscores in Go names; var var_map should be varMap (golint)
    • Line 113: warning: don't use underscores in Go names; var result_i should be resultI (golint)
    • Line 123: warning: don't use underscores in Go names; var assert_map should be assertMap (golint)
    • Line 126: warning: don't use underscores in Go names; var var_map should be varMap (golint)
    • Line 127: warning: don't use underscores in Go names; var result_i should be resultI (golint)
    • Line 137: warning: don't use underscores in Go names; var assert_map should be assertMap (golint)
    • Line 141: warning: don't use underscores in Go names; var var_map should be varMap (golint)
    • Line 145: warning: don't use underscores in Go names; var result_i should be resultI (golint)
    • Line 155: warning: don't use underscores in Go names; var assert_map should be assertMap (golint)
    • Line 164: warning: don't use underscores in Go names; var var_map should be varMap (golint)
    • Line 165: warning: don't use underscores in Go names; var result_i should be resultI (golint)
    • Line 175: warning: don't use underscores in Go names; var assert_map should be assertMap (golint)
    • Line 178: warning: don't use underscores in Go names; var var_map should be varMap (golint)
    • Line 179: warning: don't use underscores in Go names; var result_i should be resultI (golint)
    • Line 189: warning: don't use underscores in Go names; var assert_map should be assertMap (golint)
    • Line 192: warning: don't use underscores in Go names; var var_map should be varMap (golint)
    • Line 195: warning: don't use underscores in Go names; var result_i should be resultI (golint)
    • go-codon/flowgen/shared/spec.go
    • Line 17: warning: exported type PostSpec should have comment or be unexported (golint)
    • Line 28: warning: exported type Spec should have comment or be unexported (golint)
    • Line 37: warning: exported type Task should have comment or be unexported (golint)
    • Line 61: warning: exported type LoopInfo should have comment or be unexported (golint)
    • Line 72: warning: exported type TodoObj should have comment or be unexported (golint)
    • Line 78: warning: exported type PublishObj should have comment or be unexported (golint)
    • Line 84: warning: exported type Expression should have comment or be unexported (golint)
    • Line 90: warning: exported type Action should have comment or be unexported (golint)
    • Line 96: warning: exported function ReadSpec should have comment or be unexported (golint)
    • Line 97: warning: don't use underscores in Go names; var filename_data should be filenameData (golint)
    • Line 112: warning: exported method Spec.Process should have comment or be unexported (golint)
    • Line 141: warning: don't use underscores in Go names; range var task_name should be taskName (golint)
    • Line 141: warning: should omit 2nd value from range; this loop is equivalent to `for task_name := range ...` (golint)
    • Line 142: warning: don't use underscores in Go names; var task_obj should be taskObj (golint)
    • Line 188: warning: don't use underscores in Go names; var all_actions should be allActions (golint)
    • Line 190: warning: don't use underscores in Go names; range var task_obj should be taskObj (golint)
    • Line 191: warning: don't use underscores in Go names; var action_obj should be actionObj (golint)
    • Line 202: warning: don't use underscores in Go names; method parameter all_exprs should be allExprs (golint)
    • Line 206: warning: don't use underscores in Go names; var expr_obj should be exprObj (golint)
    • Line 218: warning: don't use underscores in Go names; var all_exprs should be allExprs (golint)
    • Line 228: warning: don't use underscores in Go names; range var publish_obj should be publishObj (golint)
    • Line 235: warning: don't use underscores in Go names; range var publish_obj should be publishObj (golint)
    • Line 242: warning: don't use underscores in Go names; range var publish_obj should be publishObj (golint)
    • Line 249: warning: don't use underscores in Go names; range var task_obj should be taskObj (golint)
    • Line 256: warning: don't use underscores in Go names; range var task_obj should be taskObj (golint)
    • Line 263: warning: don't use underscores in Go names; range var task_obj should be taskObj (golint)
    • Line 282: warning: don't use underscores in Go names; range var task_obj should be taskObj (golint)
    • Line 289: warning: don't use underscores in Go names; range var task_obj should be taskObj (golint)
    • Line 312: warning: don't use underscores in Go names; var expr_obj should be exprObj (golint)
    • Line 328: warning: don't use underscores in Go names; var expr_obj should be exprObj (golint)
    • Line 341: warning: don't use underscores in Go names; func parameter expr_imap should be exprImap (golint)
    • Line 342: warning: don't use underscores in Go names; var expr_map should be exprMap (golint)
    • Line 345: warning: don't use underscores in Go names; var val_type should be valType (golint)
    • Line 349: warning: don't use underscores in Go names; var val_type_str should be valTypeStr (golint)
    • Line 355: warning: don't use underscores in Go names; var val_type should be valType (golint)
    • Line 359: warning: don't use underscores in Go names; var val_type_str should be valTypeStr (golint)
    • Line 364: warning: don't use underscores in Go names; var val_type_str should be valTypeStr (golint)
    • Line 370: warning: don't use underscores in Go names; method result todo_list should be todoList (golint)
    • Line 375: warning: don't use underscores in Go names; method result todo_list should be todoList (golint)
    • Line 380: warning: don't use underscores in Go names; method result todo_list should be todoList (golint)
    • Line 385: warning: don't use underscores in Go names; method result publish_list should be publishList (golint)
    • Line 390: warning: don't use underscores in Go names; method result publish_map should be publishMap (golint)
    • Line 395: warning: don't use underscores in Go names; method result publish_list should be publishList (golint)
    • Line 400: warning: don't use underscores in Go names; method result publish_map should be publishMap (golint)
    • Line 405: warning: don't use underscores in Go names; method result publish_list should be publishList (golint)
    • Line 410: warning: don't use underscores in Go names; method result publish_map should be publishMap (golint)
    • Line 415: warning: don't use underscores in Go names; method result publish_list should be publishList (golint)
    • Line 420: warning: don't use underscores in Go names; method result publish_map should be publishMap (golint)
    • Line 425: warning: don't use underscores in Go names; method result publish_list should be publishList (golint)
    • Line 430: warning: don't use underscores in Go names; method result publish_map should be publishMap (golint)
    • Line 435: warning: don't use underscores in Go names; var expr_regex should be exprRegex (golint)
    • Line 438: warning: don't use underscores in Go names; var type_expr should be typeExpr (golint)
    • Line 439: warning: don't use underscores in Go names; var ret_expr should be retExpr (golint)
    • Line 466: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 479: warning: don't use underscores in Go names; var ret_action should be retAction (golint)
    • Line 481: warning: don't use underscores in Go names; var action_elems should be actionElems (golint)
    • Line 492: warning: don't use underscores in Go names; func parameter publish_list should be publishList (golint)
    • Line 493: warning: don't use underscores in Go names; var publish_map should be publishMap (golint)
    • Line 494: warning: don't use underscores in Go names; range var publish_obj should be publishObj (golint)
    • Line 500: warning: don't use underscores in Go names; func parameter map_list should be mapList (golint)
    • Line 506: warning: don't use underscores in Go names; var map_list_v should be mapListV (golint)
    • Line 509: warning: don't use underscores in Go names; range var ce_i should be ceI (golint)
    • Line 524: warning: don't use underscores in Go names; range var task_map_i should be taskMapI (golint)
    • Line 525: warning: don't use underscores in Go names; var task_map should be taskMap (golint)
    • Line 529: warning: don't use underscores in Go names; range var ce_i should be ceI (golint)
    • Line 549: warning: don't use underscores in Go names; func parameter map_list should be mapList (golint)
    • Line 552: warning: don't use underscores in Go names; range var task_map should be taskMap (golint)
    • go-codon/bootstrap/bootstrap.go
    • Line 12: warning: don't use underscores in Go names; var language_map should be languageMap (golint)
    • Line 16: warning: exported function Bootstrap should have comment or be unexported (golint)
    • go-codon/runtime/templates/templates.go
    • Line 11: warning: exported var TemplateMap should have comment or be unexported (golint)
    • Line 13: warning: don't use underscores in Go names; var init_completed should be initCompleted (golint)
    • Line 15: warning: exported function Init should have comment or be unexported (golint)
    • Line 15: warning: don't use underscores in Go names; func parameter get_asset should be getAsset (golint)
    • Line 19: warning: don't use underscores in Go names; range var asset_name should be assetName (golint)
    • Line 20: warning: don't use underscores in Go names; var asset_b should be assetB (golint)
    • Line 47: warning: exported function Execute should have comment or be unexported (golint)
    • go-codon/flowgen/languages/golang.go
    • Line 15: warning: exported type GoGenerator should have comment or be unexported (golint)
    • Line 22: warning: exported type OutputObj should have comment or be unexported (golint)
    • Line 31: warning: don't use underscores in Go names; var output_val should be outputVal (golint)
    • Line 40: warning: don't use underscores in Go names; var output_val_str should be outputValStr (golint)
    • Line 59: warning: don't use underscores in Go names; var import_path should be importPath (golint)
    • Line 66: warning: don't use underscores in Go names; range var expr_obj should be exprObj (golint)
    • Line 78: warning: don't use underscores in Go names; range var action_obj should be actionObj (golint)
    • Line 79: warning: don't use underscores in Go names; var action_obj_type should be actionObjType (golint)
    • Line 93: warning: exported method GoGenerator.Generate should have comment or be unexported (golint)
    • Line 99: warning: don't use underscores in Go names; var template_location should be templateLocation (golint)
    • Line 109: warning: don't use underscores in Go names; var dest_base should be destBase (golint)
    • go-codon/shared/spec.go
    • Line 17: warning: exported const SWAGGER should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported function DetectFileSpec should have comment or be unexported (golint)
    • Line 40: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 46: warning: comment on exported function BaseImport should be of the form "BaseImport ..." (golint)
    • Line 88: warning: exported function Pascalize should have comment or be unexported (golint)
    • go-codon/generator/generator.go
    • Line 9: warning: exported type GenOpts should have comment or be unexported (golint)
    • Line 15: warning: don't use underscores in Go names; var language_map should be languageMap (golint)
    • Line 19: warning: exported function Generate should have comment or be unexported (golint)
    • go-codon/generator/golang/upstream_swagger.go
    • Line 13: warning: exported function GenerateUpstreamSwagger should have comment or be unexported (golint)
    • Line 49: warning: don't use underscores in Go names; var import_path should be importPath (golint)
    • Line 59: warning: exported function GenerateServiceSwagger should have comment or be unexported (golint)
    • Line 111: warning: don't use underscores in Go names; var workflow_import should be workflowImport (golint)
    • go-codon/flowgen/generator/process.go
    • Line 7: warning: exported function Process should have comment or be unexported (golint)
    • Line 18: warning: don't use underscores in Go names; var spec_ptr should be specPtr (golint)
    • Line 20: warning: don't use underscores in Go names; var post_spec should be postSpec (golint)
    • go-codon/bootstrap/golang/golang.go
    • Line 42: warning: don't use underscores in Go names; method process_templates should be processTemplates (golint)
    • Line 61: warning: don't use underscores in Go names; var new_asset_path should be newAssetPath (golint)
    • Line 67: warning: don't use underscores in Go names; var base_path should be basePath (golint)
    • Line 112: warning: exported var Bootstrapper should have comment or be unexported (golint)
    • go-codon/generator/golang/golang.go
    • Line 40: warning: don't use underscores in Go names; var upstream_generator_list should be upstreamGeneratorList (golint)
    • Line 45: warning: don't use underscores in Go names; var service_generator_list should be serviceGeneratorList (golint)
    • Line 71: warning: don't use underscores in Go names; method process_templates should be processTemplates (golint)
    • Line 86: warning: don't use underscores in Go names; var new_asset_path should be newAssetPath (golint)
    • Line 92: warning: don't use underscores in Go names; var base_path should be basePath (golint)
    • Line 116: warning: don't use underscores in Go names; method process_config should be processConfig (golint)
    • Line 119: warning: don't use underscores in Go names; range var endpoint_name should be endpointName (golint)
    • Line 131: warning: exported function GenerateUnknown should have comment or be unexported (golint)
    • Line 162: warning: don't use underscores in Go names; var spec_type should be specType (golint)
    • Line 163: warning: don't use underscores in Go names; var gen_func should be genFunc (golint)
    • Line 185: warning: don't use underscores in Go names; var spec_type should be specType (golint)
    • Line 186: warning: don't use underscores in Go names; var gen_func should be genFunc (golint)
    • Line 203: warning: don't use underscores in Go names; var new_prefix should be newPrefix (golint)
    • Line 215: warning: don't use underscores in Go names; var rel_path should be relPath (golint)
    • Line 289: warning: exported var Generator should have comment or be unexported (golint)
    • Line 303: warning: don't use underscores in Go names; var new_content should be newContent (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!