Preparing report...

Report for github.com/Konstantin8105/c4go

(v0.0.0-20240529143150-f335d91b3580)

A+    Excellent!    Found 32 issues across 355 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!


gofmt99%

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!


gocyclo90%

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.

    • ast/position.go
    • Line 233: warning: cyclomatic complexity 109 of function setPosition() is high (> 15) (gocyclo)
    • Line 37: warning: cyclomatic complexity 17 of function NewPositionFromString() is high (> 15) (gocyclo)
    • transpiler/functions.go
    • Line 285: warning: cyclomatic complexity 44 of function bindingFunctionDecl() is high (> 15) (gocyclo)
    • Line 49: warning: cyclomatic complexity 28 of function transpileFunctionDecl() is high (> 15) (gocyclo)
    • main.go
    • Line 573: warning: cyclomatic complexity 26 of function runCommand() is high (> 15) (gocyclo)
    • Line 272: warning: cyclomatic complexity 18 of function avoidGoKeywords() is high (> 15) (gocyclo)
    • ast/ast_test.go
    • Line 26: warning: cyclomatic complexity 20 of function runNodeTests() is high (> 15) (gocyclo)
    • types/cast.go
    • Line 65: warning: cyclomatic complexity 93 of function CastExpr() is high (> 15) (gocyclo)
    • transpiler/operators.go
    • Line 431: warning: cyclomatic complexity 82 of function atomicOperation() is high (> 15) (gocyclo)
    • Line 320: warning: cyclomatic complexity 35 of function getTokenForOperator() is high (> 15) (gocyclo)
    • Line 88: warning: cyclomatic complexity 21 of function transpileConditionalOperator() is high (> 15) (gocyclo)
    • transpiler/declarations.go
    • Line 108: warning: cyclomatic complexity 40 of function transpileRecordDecl() is high (> 15) (gocyclo)
    • Line 593: warning: cyclomatic complexity 38 of function transpileVarDecl() is high (> 15) (gocyclo)
    • Line 432: warning: cyclomatic complexity 19 of function transpileTypedefDecl() is high (> 15) (gocyclo)
    • transpiler/transpiler.go
    • Line 497: warning: cyclomatic complexity 37 of function transpileToNode() is high (> 15) (gocyclo)
    • Line 331: warning: cyclomatic complexity 33 of function transpileToStmt() is high (> 15) (gocyclo)
    • Line 181: warning: cyclomatic complexity 32 of function transpileToExpr() is high (> 15) (gocyclo)
    • Line 24: warning: cyclomatic complexity 28 of function TranspileAST() is high (> 15) (gocyclo)
    • transpiler/branch.go
    • Line 140: warning: cyclomatic complexity 34 of function transpileForStmt() is high (> 15) (gocyclo)
    • Line 20: warning: cyclomatic complexity 20 of function transpileIfStmt() is high (> 15) (gocyclo)
    • transpiler/call.go
    • Line 205: warning: cyclomatic complexity 72 of function transpileCallExpr() is high (> 15) (gocyclo)
    • Line 40: warning: cyclomatic complexity 21 of function getName() is high (> 15) (gocyclo)
    • Line 129: warning: cyclomatic complexity 18 of function simplificationCallExprPrintf() is high (> 15) (gocyclo)
    • transpiler/cast.go
    • Line 13: warning: cyclomatic complexity 39 of function transpileImplicitCastExpr() is high (> 15) (gocyclo)
    • Line 205: warning: cyclomatic complexity 32 of function transpileCStyleCastExpr() is high (> 15) (gocyclo)
    • transpiler/variables.go
    • Line 381: warning: cyclomatic complexity 28 of function transpileMemberExpr() is high (> 15) (gocyclo)
    • Line 145: warning: cyclomatic complexity 25 of function transpileInitListExpr() is high (> 15) (gocyclo)
    • main_test.go
    • Line 40: warning: cyclomatic complexity 32 of function TestIntegrationScripts() is high (> 15) (gocyclo)
    • Line 309: warning: cyclomatic complexity 17 of function (ProgramArgs).runGoTest() is high (> 15) (gocyclo)
    • transpiler/enum.go
    • Line 83: warning: cyclomatic complexity 29 of function transpileEnumDeclWithType() is high (> 15) (gocyclo)
    • transpiler/value_to_pointer.go
    • Line 180: warning: cyclomatic complexity 27 of function GetPointerAddress() is high (> 15) (gocyclo)
    • Line 657: warning: cyclomatic complexity 25 of function pointerArithmetic() is high (> 15) (gocyclo)
    • Line 523: warning: cyclomatic complexity 18 of function PntBitCast() is high (> 15) (gocyclo)
    • Line 397: warning: cyclomatic complexity 17 of function PntCmpPnt() is high (> 15) (gocyclo)
    • unused.go
    • Line 12: warning: cyclomatic complexity 18 of function unused() is high (> 15) (gocyclo)
    • ast/ast.go
    • Line 39: warning: cyclomatic complexity 133 of function Parse() is high (> 15) (gocyclo)
    • util/util.go
    • Line 88: warning: cyclomatic complexity 45 of function ParseFunction() is high (> 15) (gocyclo)
    • transpiler/switch.go
    • Line 201: warning: cyclomatic complexity 32 of function transpileSwitchStmt() is high (> 15) (gocyclo)
    • Line 94: warning: cyclomatic complexity 17 of function caseSplitter() is high (> 15) (gocyclo)
    • debug.go
    • Line 499: warning: cyclomatic complexity 36 of function (*inj).walk() is high (> 15) (gocyclo)
    • Line 186: warning: cyclomatic complexity 28 of function generateDebugCCode() is high (> 15) (gocyclo)
    • preprocessor/preprocessor.go
    • Line 120: warning: cyclomatic complexity 34 of function NewFilePP() is high (> 15) (gocyclo)
    • Line 316: warning: cyclomatic complexity 24 of function (FilePP).GetSnippet() is high (> 15) (gocyclo)
    • cstd_test.go
    • Line 366: warning: cyclomatic complexity 26 of function TestCSTD() is high (> 15) (gocyclo)
    • other_test.go
    • Line 64: warning: cyclomatic complexity 17 of function TestBookSources() 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!