Preparing report...

Report for oras.land/oras-go/v2

(v2.0.0-20220524144344-23cb9e0960a5)

A+    Excellent!    Found 17 issues across 67 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!


gofmt100%

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

No problems detected. Good job!


gocyclo82%

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.

    • registry/remote/auth/client_test.go
    • Line 872: warning: cyclomatic complexity 34 of function TestClient_Do_Bearer_OAuth2_Password_Cached() is high (> 15) (gocyclo)
    • Line 1181: warning: cyclomatic complexity 33 of function TestClient_Do_Bearer_OAuth2_RefreshToken_Cached() is high (> 15) (gocyclo)
    • Line 575: warning: cyclomatic complexity 30 of function TestClient_Do_Bearer_Auth_Cached() is high (> 15) (gocyclo)
    • Line 725: warning: cyclomatic complexity 28 of function TestClient_Do_Bearer_OAuth2_Password() is high (> 15) (gocyclo)
    • Line 1482: warning: cyclomatic complexity 28 of function TestClient_Do_Scope_Hint_Mismatch() is high (> 15) (gocyclo)
    • Line 1860: warning: cyclomatic complexity 28 of function TestClient_Do_Scheme_Change() is high (> 15) (gocyclo)
    • Line 1343: warning: cyclomatic complexity 27 of function TestClient_Do_Token_Expire() is high (> 15) (gocyclo)
    • Line 1043: warning: cyclomatic complexity 27 of function TestClient_Do_Bearer_OAuth2_RefreshToken() is high (> 15) (gocyclo)
    • Line 449: warning: cyclomatic complexity 24 of function TestClient_Do_Bearer_Auth() is high (> 15) (gocyclo)
    • Line 341: warning: cyclomatic complexity 21 of function TestClient_Do_Bearer_AccessToken_Cached() is high (> 15) (gocyclo)
    • Line 153: warning: cyclomatic complexity 21 of function TestClient_Do_Basic_Auth_Cached() is high (> 15) (gocyclo)
    • Line 1779: warning: cyclomatic complexity 17 of function TestClient_Do_Anonymous_Pull() is high (> 15) (gocyclo)
    • Line 72: warning: cyclomatic complexity 16 of function TestClient_Do_Basic_Auth() is high (> 15) (gocyclo)
    • Line 254: warning: cyclomatic complexity 16 of function TestClient_Do_Bearer_AccessToken() is high (> 15) (gocyclo)
    • copy_test.go
    • Line 238: warning: cyclomatic complexity 21 of function TestCopyGraph_PartialCopy() is high (> 15) (gocyclo)
    • Line 136: warning: cyclomatic complexity 16 of function TestCopyGraph_FullCopy() is high (> 15) (gocyclo)
    • content/oci/oci_test.go
    • Line 747: warning: cyclomatic complexity 33 of function TestStore_ExistingStore() is high (> 15) (gocyclo)
    • Line 1387: warning: cyclomatic complexity 20 of function TestCopyGraph_OCIToMemory_PartialCopy() is high (> 15) (gocyclo)
    • Line 1169: warning: cyclomatic complexity 20 of function TestCopyGraph_MemoryToOCI_PartialCopy() is high (> 15) (gocyclo)
    • Line 521: warning: cyclomatic complexity 17 of function TestStore_RepeatTag() is high (> 15) (gocyclo)
    • Line 1066: warning: cyclomatic complexity 16 of function TestCopyGraph_MemoryToOCI_FullCopy() is high (> 15) (gocyclo)
    • Line 167: warning: cyclomatic complexity 16 of function TestStore_NotExistRoot_Success() is high (> 15) (gocyclo)
    • Line 1284: warning: cyclomatic complexity 16 of function TestCopyGraph_OCIToMemory_FullCopy() is high (> 15) (gocyclo)
    • Line 79: warning: cyclomatic complexity 16 of function TestStore_Success() is high (> 15) (gocyclo)
    • registry/remote/auth/cache_test.go
    • Line 91: warning: cyclomatic complexity 30 of function Test_concurrentCache_GetToken() is high (> 15) (gocyclo)
    • Line 254: warning: cyclomatic complexity 19 of function Test_concurrentCache_Set() is high (> 15) (gocyclo)
    • Line 444: warning: cyclomatic complexity 17 of function Test_concurrentCache_Set_Fetch_Failure() is high (> 15) (gocyclo)
    • registry/remote/repository_test.go
    • Line 601: warning: cyclomatic complexity 29 of function TestRepository_FetchReference() is high (> 15) (gocyclo)
    • Line 2067: warning: cyclomatic complexity 29 of function Test_ManifestStore_FetchReference() is high (> 15) (gocyclo)
    • Line 1614: warning: cyclomatic complexity 29 of function Test_BlobStore_FetchReference_Seek() is high (> 15) (gocyclo)
    • Line 1094: warning: cyclomatic complexity 27 of function Test_BlobStore_Fetch_Seek() is high (> 15) (gocyclo)
    • Line 1515: warning: cyclomatic complexity 20 of function Test_BlobStore_FetchReference() is high (> 15) (gocyclo)
    • Line 450: warning: cyclomatic complexity 19 of function TestRepository_Tag() is high (> 15) (gocyclo)
    • Line 138: warning: cyclomatic complexity 18 of function TestRepository_Push() is high (> 15) (gocyclo)
    • Line 52: warning: cyclomatic complexity 17 of function TestRepository_Fetch() is high (> 15) (gocyclo)
    • Line 358: warning: cyclomatic complexity 16 of function TestRepository_Resolve() is high (> 15) (gocyclo)
    • content/file/file_test.go
    • Line 361: warning: cyclomatic complexity 22 of function TestStore_Dir_Push() is high (> 15) (gocyclo)
    • Line 79: warning: cyclomatic complexity 22 of function TestStore_Success() is high (> 15) (gocyclo)
    • Line 2156: warning: cyclomatic complexity 19 of function TestCopyGraph_MemoryToFile_PartialCopy() is high (> 15) (gocyclo)
    • Line 891: warning: cyclomatic complexity 19 of function TestStore_File_Add_SameContent() is high (> 15) (gocyclo)
    • Line 2462: warning: cyclomatic complexity 19 of function TestCopyGraph_FileToMemory_PartialCopy() is high (> 15) (gocyclo)
    • Line 213: warning: cyclomatic complexity 18 of function TestStore_Close() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell91%

Misspell Finds commonly misspelled English words