Preparing report...

Report for github.com/nats-io/nsc

(v0.0.0-20221206222106-35db9400b257)

A+    Excellent!    Found 37 issues across 168 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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo77%

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.

    • cmd/fixenv.go
    • Line 193: warning: cyclomatic complexity 27 of function (*FixCmd).Regenerate() is high (> 15) (gocyclo)
    • cmd/editoperator.go
    • Line 122: warning: cyclomatic complexity 20 of function (*EditOperatorParams).PostInteractive() is high (> 15) (gocyclo)
    • Line 192: warning: cyclomatic complexity 17 of function (*EditOperatorParams).Validate() is high (> 15) (gocyclo)
    • cmd/validate.go
    • Line 193: warning: cyclomatic complexity 21 of function (*ValidateCmdParams).validate() is high (> 15) (gocyclo)
    • cmd/load.go
    • Line 118: warning: cyclomatic complexity 17 of function (*LoadParams).addOperator() is high (> 15) (gocyclo)
    • cmd/migrate.go
    • Line 275: warning: cyclomatic complexity 24 of function (*MigrateJob).Run() is high (> 15) (gocyclo)
    • cmd/util_test.go
    • Line 673: warning: cyclomatic complexity 21 of function RunTestAccountServerWithOperatorKP() is high (> 15) (gocyclo)
    • cmd/signerparams.go
    • Line 201: warning: cyclomatic complexity 20 of function (*SignerParams).ResolveWithPriority() is high (> 15) (gocyclo)
    • cmd/init.go
    • Line 235: warning: cyclomatic complexity 16 of function (*InitCmdParams).createStore() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 16 of function (*InitCmdParams).resolveOperator() is high (> 15) (gocyclo)
    • Line 308: warning: cyclomatic complexity 16 of function createSystemAccount() is high (> 15) (gocyclo)
    • cmd/addaccount.go
    • Line 177: warning: cyclomatic complexity 16 of function (*AddAccountParams).Validate() is high (> 15) (gocyclo)
    • cmd/addimport.go
    • Line 137: warning: cyclomatic complexity 23 of function (*AddImportParams).addLocalExport() is high (> 15) (gocyclo)
    • cmd/push.go
    • Line 117: warning: cyclomatic complexity 23 of function getSystemAccountUser() is high (> 15) (gocyclo)
    • Line 300: warning: cyclomatic complexity 23 of function (*PushCmdParams).Validate() is high (> 15) (gocyclo)
    • Line 520: warning: cyclomatic complexity 19 of function (*PushCmdParams).Run() is high (> 15) (gocyclo)
    • cmd/subtool.go
    • Line 117: warning: cyclomatic complexity 17 of function (*SubParams).Run() is high (> 15) (gocyclo)
    • cmd/edituser.go
    • Line 420: warning: cyclomatic complexity 17 of function (*UserPermissionLimits).Run() is high (> 15) (gocyclo)
    • Line 207: warning: cyclomatic complexity 17 of function (*EditUserParams).Run() is high (> 15) (gocyclo)
    • cmd/editaccount.go
    • Line 654: warning: cyclomatic complexity 22 of function (*EditAccountParams).Run() is high (> 15) (gocyclo)
    • Line 386: warning: cyclomatic complexity 21 of function (*EditAccountParams).PostInteractiveTier() is high (> 15) (gocyclo)
    • Line 555: warning: cyclomatic complexity 18 of function (*EditAccountParams).applyLimits() is high (> 15) (gocyclo)
    • Line 457: warning: cyclomatic complexity 16 of function (*EditAccountParams).PostInteractive() is high (> 15) (gocyclo)
    • Line 239: warning: cyclomatic complexity 16 of function (*EditAccountParams).loadLimits() is high (> 15) (gocyclo)
    • cmd/generatediagram.go
    • Line 269: warning: cyclomatic complexity 54 of function objectDiagram() is high (> 15) (gocyclo)
    • Line 125: warning: cyclomatic complexity 34 of function componentDiagram() is high (> 15) (gocyclo)
    • cmd/addexport.go
    • Line 264: warning: cyclomatic complexity 18 of function (*AddExportParams).Validate() is high (> 15) (gocyclo)
    • Line 113: warning: cyclomatic complexity 17 of function (*AddExportParams).PreInteractive() is high (> 15) (gocyclo)
    • cmd/deleteuser.go
    • Line 176: warning: cyclomatic complexity 17 of function (*DeleteUserParams).Run() is high (> 15) (gocyclo)
    • cmd/adduser.go
    • Line 518: warning: cyclomatic complexity 16 of function (*PermissionsParams).Run() is high (> 15) (gocyclo)
    • cmd/describer.go
    • Line 40: warning: cyclomatic complexity 31 of function (*AccountDescriber).Describe() is high (> 15) (gocyclo)
    • cmd/editexport.go
    • Line 338: warning: cyclomatic complexity 27 of function (*EditExportParams).Run() is high (> 15) (gocyclo)
    • Line 142: warning: cyclomatic complexity 23 of function (*EditExportParams).PostInteractive() is high (> 15) (gocyclo)
    • cmd/pull.go
    • Line 247: warning: cyclomatic complexity 18 of function (*PullParams).Run() is high (> 15) (gocyclo)

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!