Preparing report...

Report for github.com/burbon/terraform-provider-restapi

B    Not bad!    Found 12 issues across 17 files

Tweet

gofmt76%

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!


golint29%

Golint is a linter for Go source code.

    • terraform-provider-restapi/restapi/api_client_test.go
    • Line 10: warning: don't use underscores in Go names; var api_client_server should be apiClientServer (golint)
    • Line 78: warning: don't use underscores in Go names; func setup_api_client_server should be setupAPIClientServer (golint)
    • Line 100: warning: don't use underscores in Go names; func shutdown_api_client_server should be shutdownAPIClientServer (golint)
    • terraform-provider-restapi/restapi/common.go
    • Line 13: warning: don't use underscores in Go names; func set_resource_state should be setResourceState (golint)
    • Line 14: warning: don't use underscores in Go names; var api_data should be apiData (golint)
    • Line 21: warning: comment on exported function GetStringAtKey should be of the form "GetStringAtKey ..." (golint)
    • Line 39: warning: comment on exported function GetObjectAtKey should be of the form "GetObjectAtKey ..." (golint)
    • Line 127: warning: comment on exported function GetKeys should be of the form "GetKeys ..." (golint)
    • terraform-provider-restapi/restapi/datasource_api_object.go
    • Line 61: warning: don't use underscores in Go names; var query_string should be queryString (golint)
    • Line 68: warning: don't use underscores in Go names; var search_key should be searchKey (golint)
    • Line 69: warning: don't use underscores in Go names; var search_value should be searchValue (golint)
    • Line 70: warning: don't use underscores in Go names; var results_key should be resultsKey (golint)
    • Line 71: warning: don't use underscores in Go names; var id_attribute should be idAttribute (golint)
    • terraform-provider-restapi/restapi/resource_api_object_test.go
    • Line 27: warning: don't use underscores in Go names; var api_server_objects should be apiServerObjects (golint)
    • Line 101: warning: don't use underscores in Go names; func generate_test_resource should be generateTestResource (golint)
    • Line 102: warning: don't use underscores in Go names; var str_data should be strData (golint)
    • Line 111: warning: don't use underscores in Go names; var str_config should be strConfig (golint)
    • terraform-provider-restapi/restapi/api_client.go
    • Line 22: warning: don't use underscores in Go names; struct field use_cookie should be useCookie (golint)
    • Line 24: warning: don't use underscores in Go names; struct field id_attribute should be idAttribute (golint)
    • Line 25: warning: don't use underscores in Go names; struct field copy_keys should be copyKeys (golint)
    • Line 26: warning: don't use underscores in Go names; struct field write_returns_object should be writeReturnsObject (golint)
    • Line 27: warning: don't use underscores in Go names; struct field create_returns_object should be createReturnsObject (golint)
    • Line 28: warning: don't use underscores in Go names; struct field xssi_prefix should be xssiPrefix (golint)
    • Line 29: warning: don't use underscores in Go names; struct field use_cookies should be useCookies (golint)
    • Line 33: warning: don't use underscores in Go names; type api_client should be apiClient (golint)
    • Line 34: warning: don't use underscores in Go names; struct field http_client should be httpClient (golint)
    • Line 41: warning: don't use underscores in Go names; struct field use_cookie should be useCookie (golint)
    • Line 43: warning: don't use underscores in Go names; struct field id_attribute should be idAttribute (golint)
    • Line 44: warning: don't use underscores in Go names; struct field copy_keys should be copyKeys (golint)
    • Line 45: warning: don't use underscores in Go names; struct field write_returns_object should be writeReturnsObject (golint)
    • Line 46: warning: don't use underscores in Go names; struct field create_returns_object should be createReturnsObject (golint)
    • Line 47: warning: don't use underscores in Go names; struct field xssi_prefix should be xssiPrefix (golint)
    • Line 51: warning: comment on exported function NewAPIClient should be of the form "NewAPIClient ..." (golint)
    • Line 133: warning: receiver name client should be consistent with previous receiver name obj for api_client (golint)
    • Line 133: warning: don't use underscores in Go names; method send_request should be sendRequest (golint)
    • Line 134: warning: don't use underscores in Go names; var full_uri should be fullURI (golint)
    • Line 191: warning: don't use underscores in Go names; var num_redirects should be numRedirects (golint)
    • Line 221: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • terraform-provider-restapi/restapi/api_object.go
    • Line 16: warning: don't use underscores in Go names; struct field get_path should be getPath (golint)
    • Line 17: warning: don't use underscores in Go names; struct field post_path should be postPath (golint)
    • Line 18: warning: don't use underscores in Go names; struct field create_with_put should be createWithPut (golint)
    • Line 19: warning: don't use underscores in Go names; struct field put_path should be putPath (golint)
    • Line 20: warning: don't use underscores in Go names; struct field delete_path should be deletePath (golint)
    • Line 21: warning: don't use underscores in Go names; struct field search_path should be searchPath (golint)
    • Line 24: warning: don't use underscores in Go names; struct field id_attribute should be idAttribute (golint)
    • Line 28: warning: don't use underscores in Go names; type api_object should be apiObject (golint)
    • Line 29: warning: don't use underscores in Go names; struct field api_client should be apiClient (golint)
    • Line 30: warning: don't use underscores in Go names; struct field get_path should be getPath (golint)
    • Line 31: warning: don't use underscores in Go names; struct field post_path should be postPath (golint)
    • Line 32: warning: don't use underscores in Go names; struct field create_with_put should be createWithPut (golint)
    • Line 33: warning: don't use underscores in Go names; struct field put_path should be putPath (golint)
    • Line 34: warning: don't use underscores in Go names; struct field delete_path should be deletePath (golint)
    • Line 35: warning: don't use underscores in Go names; struct field search_path should be searchPath (golint)
    • Line 38: warning: don't use underscores in Go names; struct field id_attribute should be idAttribute (golint)
    • Line 42: warning: don't use underscores in Go names; struct field api_data should be apiData (golint)
    • Line 45: warning: comment on exported function NewAPIObject should be of the form "NewAPIObject ..." (golint)
    • Line 46: warning: don't use underscores in Go names; func parameter i_client should be iClient (golint)
    • Line 114: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 143: warning: don't use underscores in Go names; method update_state should be updateState (golint)
    • Line 188: warning: don't use underscores in Go names; method create_object should be createObject (golint)
    • Line 198: warning: don't use underscores in Go names; var res_str should be resStr (golint)
    • Line 225: warning: don't use underscores in Go names; method read_object should be readObject (golint)
    • Line 230: warning: don't use underscores in Go names; var res_str should be resStr (golint)
    • Line 239: warning: don't use underscores in Go names; method update_object should be updateObject (golint)
    • Line 245: warning: don't use underscores in Go names; var res_str should be resStr (golint)
    • Line 264: warning: don't use underscores in Go names; method delete_object should be deleteObject (golint)
    • Line 278: warning: don't use underscores in Go names; method find_object should be findObject (golint)
    • Line 278: warning: don't use underscores in Go names; method parameter query_string should be queryString (golint)
    • Line 278: warning: don't use underscores in Go names; method parameter search_key should be searchKey (golint)
    • Line 278: warning: don't use underscores in Go names; method parameter search_value should be searchValue (golint)
    • Line 278: warning: don't use underscores in Go names; method parameter results_key should be resultsKey (golint)
    • Line 279: warning: don't use underscores in Go names; var data_array should be dataArray (golint)
    • Line 285: warning: don't use underscores in Go names; var search_path should be searchPath (golint)
    • Line 296: warning: don't use underscores in Go names; var res_str should be resStr (golint)
    • Line 372: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • terraform-provider-restapi/restapi/api_object_test.go
    • Line 13: warning: don't use underscores in Go names; var test_debug should be testDebug (golint)
    • Line 14: warning: don't use underscores in Go names; var http_server_debug should be httpServerDebug (golint)
    • Line 15: warning: don't use underscores in Go names; var api_object_debug should be apiObjectDebug (golint)
    • Line 16: warning: don't use underscores in Go names; var api_client_debug should be apiClientDebug (golint)
    • Line 18: warning: don't use underscores in Go names; type test_api_object should be testAPIObject (golint)
    • Line 19: warning: don't use underscores in Go names; struct field Test_case should be TestCase (golint)
    • Line 23: warning: don't use underscores in Go names; struct field Is_cat should be IsCat (golint)
    • Line 28: warning: don't use underscores in Go names; var testing_data_objects should be testingDataObjects (golint)
    • Line 98: warning: don't use underscores in Go names; func parameter data_objects should be dataObjects (golint)
    • Line 98: warning: don't use underscores in Go names; func parameter test_debug should be testDebug (golint)
    • Line 105: warning: don't use underscores in Go names; range var data_object should be dataObject (golint)
    • Line 106: warning: don't use underscores in Go names; var test_obj should be testObj (golint)
    • Line 106: warning: don't use underscores in Go names; var api_server_obj should be apiServerObj (golint)
    • Line 109: warning: don't use underscores in Go names; var test_case should be testCase (golint)
    • Line 125: warning: don't use underscores in Go names; func add_test_api_object should be addTestAPIObject (golint)
    • Line 125: warning: don't use underscores in Go names; func parameter test_debug should be testDebug (golint)
    • Line 125: warning: don't use underscores in Go names; func result test_obj should be testObj (golint)
    • Line 125: warning: don't use underscores in Go names; func result api_server_obj should be apiServerObj (golint)
    • Line 138: warning: don't use underscores in Go names; var generated_objects should be generatedObjects (golint)
    • Line 138: warning: don't use underscores in Go names; var api_server_objects should be apiServerObjects (golint)
    • Line 147: warning: don't use underscores in Go names; var testing_objects should be testingObjects (golint)
    • Line 149: warning: don't use underscores in Go names; range var test_obj should be testObj (golint)
    • Line 154: warning: don't use underscores in Go names; var object_opts should be objectOpts (golint)
    • Line 164: warning: don't use underscores in Go names; var test_case should be testCase (golint)
    • Line 185: warning: don't use underscores in Go names; range var Test_case should be TestCase (golint)
    • Line 185: warning: should omit 2nd value from range; this loop is equivalent to `for Test_case := range ...` (golint)
    • Line 260: warning: don't use underscores in Go names; var object_opts should be objectOpts (golint)
    • Line 269: warning: don't use underscores in Go names; var query_string should be queryString (golint)
    • Line 270: warning: don't use underscores in Go names; var search_key should be searchKey (golint)
    • Line 271: warning: don't use underscores in Go names; var search_value should be searchValue (golint)
    • Line 272: warning: don't use underscores in Go names; var results_key should be resultsKey (golint)
    • terraform-provider-restapi/restapi/provider.go
    • Line 8: warning: exported function Provider should have comment or be unexported (golint)
    • Line 108: warning: don't use underscores in Go names; var copy_keys should be copyKeys (golint)
    • Line 109: warning: don't use underscores in Go names; var i_copy_keys should be iCopyKeys (golint)
    • Line 116: warning: don't use underscores in Go names; var i_headers should be iHeaders (golint)

gocyclo76%

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.


ineffassign88%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!