Preparing report...

Report for github.com/mkdev-me/terraform-provider-openai

(v1.0.0)

A    Great!    Found 74 issues across 105 files

Tweet

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!


gofmt86%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo39%

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.

    • internal/provider/resource_openai_fine_tuning_job.go
    • Line 304: warning: cyclomatic complexity 60 of function resourceOpenAIFineTuningJobCreate() is high (> 15) (gocyclo)
    • Line 569: warning: cyclomatic complexity 47 of function resourceOpenAIFineTuningJobRead() is high (> 15) (gocyclo)
    • Line 896: warning: cyclomatic complexity 46 of function resourceOpenAIFineTuningJobImport() is high (> 15) (gocyclo)
    • internal/provider/resource_openai_vector_store_file.go
    • Line 175: warning: cyclomatic complexity 25 of function resourceOpenAIVectorStoreFileCreate() is high (> 15) (gocyclo)
    • Line 92: warning: cyclomatic complexity 25 of function importVectorStoreFileState() is high (> 15) (gocyclo)
    • Line 263: warning: cyclomatic complexity 18 of function resourceOpenAIVectorStoreFileRead() is high (> 15) (gocyclo)
    • internal/provider/resource_openai_message.go
    • Line 523: warning: cyclomatic complexity 21 of function resourceOpenAIMessageImportState() is high (> 15) (gocyclo)
    • Line 277: warning: cyclomatic complexity 20 of function resourceOpenAIMessageRead() is high (> 15) (gocyclo)
    • Line 155: warning: cyclomatic complexity 18 of function resourceOpenAIMessageCreate() is high (> 15) (gocyclo)
    • Line 374: warning: cyclomatic complexity 16 of function resourceOpenAIMessageUpdate() is high (> 15) (gocyclo)
    • internal/provider/resource_openai_thread_run.go
    • Line 435: warning: cyclomatic complexity 41 of function resourceOpenAIThreadRunCreate() is high (> 15) (gocyclo)
    • Line 669: warning: cyclomatic complexity 28 of function createRunOnExistingThread() is high (> 15) (gocyclo)
    • Line 835: warning: cyclomatic complexity 28 of function resourceOpenAIThreadRunRead() is high (> 15) (gocyclo)
    • internal/provider/resource_openai_rate_limit.go
    • Line 446: warning: cyclomatic complexity 33 of function resourceOpenAIRateLimitUpdate() is high (> 15) (gocyclo)
    • Line 90: warning: cyclomatic complexity 30 of function resourceOpenAIRateLimitCreate() is high (> 15) (gocyclo)
    • Line 277: warning: cyclomatic complexity 27 of function resourceOpenAIRateLimitRead() is high (> 15) (gocyclo)
    • Line 866: warning: cyclomatic complexity 16 of function resourceOpenAIRateLimitImport() is high (> 15) (gocyclo)
    • internal/provider/resource_openai_model_response.go
    • Line 440: warning: cyclomatic complexity 59 of function resourceOpenAIModelResponseRead() is high (> 15) (gocyclo)
    • Line 173: warning: cyclomatic complexity 57 of function resourceOpenAIModelResponseCreate() is high (> 15) (gocyclo)
    • Line 670: warning: cyclomatic complexity 33 of function resourceOpenAIModelResponseImport() is high (> 15) (gocyclo)
    • Line 840: warning: cyclomatic complexity 20 of function resourceOpenAIModelResponseCustomDiff() is high (> 15) (gocyclo)
    • internal/provider/resource_openai_vector_store_file_batch.go
    • Line 113: warning: cyclomatic complexity 28 of function resourceOpenAIVectorStoreFileBatchCreate() is high (> 15) (gocyclo)
    • Line 217: warning: cyclomatic complexity 17 of function resourceOpenAIVectorStoreFileBatchRead() is high (> 15) (gocyclo)
    • Line 273: warning: cyclomatic complexity 16 of function resourceOpenAIVectorStoreFileBatchUpdate() is high (> 15) (gocyclo)
    • internal/client/client.go
    • Line 1371: warning: cyclomatic complexity 37 of function (*OpenAIClient).UpdateRateLimit() is high (> 15) (gocyclo)
    • Line 1575: warning: cyclomatic complexity 28 of function (*OpenAIClient).DeleteRateLimit() is high (> 15) (gocyclo)
    • Line 740: warning: cyclomatic complexity 26 of function (*OpenAIClient).doRequest() is high (> 15) (gocyclo)
    • Line 2321: warning: cyclomatic complexity 19 of function SafeJoinURL() is high (> 15) (gocyclo)
    • Line 1272: warning: cyclomatic complexity 19 of function (*OpenAIClient).GetRateLimit() is high (> 15) (gocyclo)
    • internal/provider/resource_openai_batch.go
    • Line 245: warning: cyclomatic complexity 22 of function resourceOpenAIBatchRead() is high (> 15) (gocyclo)
    • Line 384: warning: cyclomatic complexity 21 of function importBatchState() is high (> 15) (gocyclo)
    • Line 132: warning: cyclomatic complexity 20 of function resourceOpenAIBatchCreate() is high (> 15) (gocyclo)
    • internal/provider/resource_openai_file.go
    • Line 103: warning: cyclomatic complexity 23 of function resourceOpenAIFileCreate() is high (> 15) (gocyclo)
    • Line 402: warning: cyclomatic complexity 18 of function resourceOpenAIFileImport() is high (> 15) (gocyclo)
    • Line 238: warning: cyclomatic complexity 16 of function resourceOpenAIFileRead() is high (> 15) (gocyclo)
    • internal/provider/resource_openai_assistant.go
    • Line 154: warning: cyclomatic complexity 30 of function resourceOpenAIAssistantCreate() is high (> 15) (gocyclo)
    • Line 315: warning: cyclomatic complexity 29 of function resourceOpenAIAssistantRead() is high (> 15) (gocyclo)
    • Line 473: warning: cyclomatic complexity 23 of function resourceOpenAIAssistantUpdate() is high (> 15) (gocyclo)
    • internal/provider/resource_openai_run.go
    • Line 265: warning: cyclomatic complexity 38 of function resourceOpenAIRunCreate() is high (> 15) (gocyclo)
    • Line 687: warning: cyclomatic complexity 37 of function resourceOpenAIRunImport() is high (> 15) (gocyclo)
    • Line 456: warning: cyclomatic complexity 31 of function resourceOpenAIRunRead() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell94%

Misspell Finds commonly misspelled English words