Preparing report...

Report for oras.land/oras-go

(v1.1.1)

A+    Excellent!    Found 16 issues across 65 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!


gofmt98%

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


gocyclo89%

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.

    • pkg/oras/copy.go
    • Line 85: warning: cyclomatic complexity 17 of function transferContent() is high (> 15) (gocyclo)
    • pkg/registry/remote/auth/client_test.go
    • Line 871: warning: cyclomatic complexity 34 of function TestClient_Do_Bearer_OAuth2_Password_Cached() is high (> 15) (gocyclo)
    • Line 1180: warning: cyclomatic complexity 33 of function TestClient_Do_Bearer_OAuth2_RefreshToken_Cached() is high (> 15) (gocyclo)
    • Line 574: warning: cyclomatic complexity 30 of function TestClient_Do_Bearer_Auth_Cached() is high (> 15) (gocyclo)
    • Line 724: warning: cyclomatic complexity 28 of function TestClient_Do_Bearer_OAuth2_Password() is high (> 15) (gocyclo)
    • Line 1481: warning: cyclomatic complexity 28 of function TestClient_Do_Scope_Hint_Mismatch() is high (> 15) (gocyclo)
    • Line 1859: warning: cyclomatic complexity 28 of function TestClient_Do_Scheme_Change() is high (> 15) (gocyclo)
    • Line 1042: warning: cyclomatic complexity 27 of function TestClient_Do_Bearer_OAuth2_RefreshToken() is high (> 15) (gocyclo)
    • Line 1342: warning: cyclomatic complexity 27 of function TestClient_Do_Token_Expire() is high (> 15) (gocyclo)
    • Line 448: warning: cyclomatic complexity 24 of function TestClient_Do_Bearer_Auth() is high (> 15) (gocyclo)
    • Line 340: warning: cyclomatic complexity 21 of function TestClient_Do_Bearer_AccessToken_Cached() is high (> 15) (gocyclo)
    • Line 152: warning: cyclomatic complexity 21 of function TestClient_Do_Basic_Auth_Cached() is high (> 15) (gocyclo)
    • Line 1778: warning: cyclomatic complexity 17 of function TestClient_Do_Anonymous_Pull() is high (> 15) (gocyclo)
    • Line 71: warning: cyclomatic complexity 16 of function TestClient_Do_Basic_Auth() is high (> 15) (gocyclo)
    • Line 253: warning: cyclomatic complexity 16 of function TestClient_Do_Bearer_AccessToken() is high (> 15) (gocyclo)
    • pkg/registry/remote/auth/cache_test.go
    • Line 90: warning: cyclomatic complexity 30 of function Test_concurrentCache_GetToken() is high (> 15) (gocyclo)
    • Line 253: warning: cyclomatic complexity 19 of function Test_concurrentCache_Set() is high (> 15) (gocyclo)
    • Line 443: warning: cyclomatic complexity 17 of function Test_concurrentCache_Set_Fetch_Failure() is high (> 15) (gocyclo)

ineffassign93%

IneffAssign detects ineffectual assignments in Go code.

    • pkg/content/untar.go
    • Line 48: warning: ineffectual assignment to err (ineffassign)
    • Line 53: warning: ineffectual assignment to err (ineffassign)
    • Line 109: warning: ineffectual assignment to err (ineffassign)
    • Line 114: warning: ineffectual assignment to err (ineffassign)
    • Line 48: warning: ineffectual assignment to err (ineffassign)
    • Line 53: warning: ineffectual assignment to err (ineffassign)
    • Line 109: warning: ineffectual assignment to err (ineffassign)
    • Line 114: warning: ineffectual assignment to err (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell90%

Misspell Finds commonly misspelled English words