Preparing report...

Report for github.com/FTwOoO/c4go

A+    Excellent!    Found 61 issues across 354 files

Tweet

gofmt99%

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


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!


golint89%

Golint is a linter for Go source code.

    • c4go/program/struct.go
    • Line 10: warning: exported type TypeOfStruct should have comment or be unexported (golint)
    • Line 13: warning: exported const UnionType should have comment (or a comment on this block) or be unexported (golint)
    • c4go/program/warnings.go
    • Line 11: warning: exported var WarningMessage should have comment or be unexported (golint)
    • Line 27: warning: exported function PathSimplification should have comment or be unexported (golint)
    • c4go/types/resolve.go
    • Line 43: warning: exported function IsGoBaseType should have comment or be unexported (golint)
    • Line 51: warning: exported function IsSigned should have comment or be unexported (golint)
    • Line 80: warning: comment on exported function IsCFloat should be of the form "IsCFloat ..." (golint)
    • Line 500: warning: exported function IsCUnsignedType should have comment or be unexported (golint)
    • c4go/noarch/ctype.go
    • Line 4: warning: exported const ISupper should have comment (or a comment on this block) or be unexported (golint)
    • c4go/noarch/fcntl.go
    • Line 5: warning: exported type Flock should have comment or be unexported (golint)
    • Line 7: warning: exported function Open should have comment or be unexported (golint)
    • c4go/noarch/ioctl.go
    • Line 7: warning: exported type Winsize should have comment or be unexported (golint)
    • Line 9: warning: exported function Ioctl should have comment or be unexported (golint)
    • c4go/ast/access_spec_decl.go
    • Line 7: warning: comment on exported type AccessSpecDecl should be of the form "AccessSpecDecl ..." (with optional leading article) (golint)
    • c4go/program/definition_function.go
    • Line 485: warning: exported method Program.SetCalled should have comment or be unexported (golint)
    • Line 493: warning: exported method Program.GetCstdFunction should have comment or be unexported (golint)
    • Line 533: warning: exported method Program.GetOutsideCalledFunctions should have comment or be unexported (golint)
    • c4go/noarch/locale.go
    • Line 3: warning: exported type Lconv should have comment or be unexported (golint)
    • Line 4: warning: don't use underscores in Go names; struct field Currency_symbol should be CurrencySymbol (golint)
    • Line 8: warning: exported function Setlocale should have comment or be unexported (golint)
    • Line 12: warning: exported function Localeconv should have comment or be unexported (golint)
    • c4go/noarch/string.go
    • Line 189: warning: exported function Strrchr should have comment or be unexported (golint)
    • Line 207: warning: exported function Strdup should have comment or be unexported (golint)
    • Line 217: warning: exported function Strerror should have comment or be unexported (golint)
    • c4go/noarch/unistd.go
    • Line 14: warning: exported function Isatty should have comment or be unexported (golint)
    • Line 27: warning: exported function CloseOnExec should have comment or be unexported (golint)
    • Line 31: warning: exported function Pipe should have comment or be unexported (golint)
    • Line 47: warning: exported function Read should have comment or be unexported (golint)
    • Line 70: warning: exported function Write should have comment or be unexported (golint)
    • Line 79: warning: exported type SsizeT should have comment or be unexported (golint)
    • Line 81: warning: exported function Ftruncate should have comment or be unexported (golint)
    • Line 89: warning: exported function Fstat should have comment or be unexported (golint)
    • c4go/noarch/wchar.go
    • Line 7: warning: exported type WcharT should have comment or be unexported (golint)
    • Line 9: warning: exported function Wcscmp should have comment or be unexported (golint)
    • Line 38: warning: exported function Wcscpy should have comment or be unexported (golint)
    • Line 48: warning: exported function Wcslen should have comment or be unexported (golint)
    • c4go/ast/annotate_attr.go
    • Line 3: warning: comment on exported type AnnotateAttr should be of the form "AnnotateAttr ..." (with optional leading article) (golint)
    • c4go/transpiler/vaarg.go
    • Line 92: warning: don't use underscores in Go names; const create_va_list should be createVaList (golint)
    • Line 93: warning: don't use underscores in Go names; const va_arg should be vaArg (golint)
    • Line 94: warning: don't use underscores in Go names; const va_start should be vaStart (golint)
    • Line 95: warning: don't use underscores in Go names; const va_end should be vaEnd (golint)
    • Line 98: warning: exported function VaListInit should have comment or be unexported (golint)
    • c4go/transpiler/value_to_pointer.go
    • Line 22: warning: exported function ConvertValueToPointer should have comment or be unexported (golint)
    • Line 86: warning: exported function GetUnsafeConvertDecls should have comment or be unexported (golint)
    • Line 347: warning: comment on exported function SubTwoPnts should be of the form "SubTwoPnts ..." (golint)
    • Line 370: warning: comment on exported function PntCmpPnt should be of the form "PntCmpPnt ..." (golint)
    • c4go/noarch/signal.go
    • Line 23: warning: exported function Raise should have comment or be unexported (golint)
    • Line 29: warning: exported function Signal should have comment or be unexported (golint)
    • c4go/ast/cold_attr.go
    • Line 3: warning: comment on exported type ColdAttr should be of the form "ColdAttr ..." (with optional leading article) (golint)
    • c4go/debug.go
    • Line 15: warning: exported type Positioner should have comment or be unexported (golint)
    • Line 438: warning: exported var FuncArgs should have comment or be unexported (golint)
    • c4go/noarch/stdio.go
    • Line 706: warning: exported function Sscanf should have comment or be unexported (golint)
    • Line 764: warning: exported function Vprintf should have comment or be unexported (golint)
    • Line 772: warning: exported function Vfprintf should have comment or be unexported (golint)
    • Line 873: warning: exported function Perror should have comment or be unexported (golint)
    • Line 878: warning: exported function Getline should have comment or be unexported (golint)
    • c4go/noarch/stdlib.go
    • Line 196: warning: exported function BSearch should have comment or be unexported (golint)
    • Line 409: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 493: warning: comment on exported var AtexitFuncs should be of the form "AtexitFuncs ..." (golint)
    • Line 496: warning: exported function Atexit should have comment or be unexported (golint)
    • Line 500: warning: exported function AtexitRun should have comment or be unexported (golint)
    • Line 506: warning: exported function Int32 should have comment or be unexported (golint)
    • Line 514: warning: exported function Exit should have comment or be unexported (golint)
    • c4go/noarch/termios.go
    • Line 9: warning: exported type Termios should have comment or be unexported (golint)
    • Line 11: warning: exported function Tcgetattr should have comment or be unexported (golint)
    • Line 18: warning: exported function Tcsetattr should have comment or be unexported (golint)
    • Line 25: warning: exported function Tcsendbreak should have comment or be unexported (golint)
    • Line 32: warning: exported function Tcdrain should have comment or be unexported (golint)
    • Line 39: warning: exported function Tcflush should have comment or be unexported (golint)
    • Line 54: warning: exported function Cfmakeraw should have comment or be unexported (golint)
    • Line 58: warning: exported function Cfgetispeed should have comment or be unexported (golint)
    • Line 62: warning: exported function Cfgetospeed should have comment or be unexported (golint)
    • c4go/main.go
    • Line 61: warning: exported type ProgramState should have comment or be unexported (golint)
    • Line 64: warning: exported const StateAst should have comment (or a comment on this block) or be unexported (golint)
    • Line 446: warning: exported function FromLinesToTree should have comment or be unexported (golint)
    • c4go/noarch/time.go
    • Line 138: warning: exported type ClockT should have comment or be unexported (golint)
    • Line 140: warning: exported function Clock should have comment or be unexported (golint)
    • Line 144: warning: exported function Difftime should have comment or be unexported (golint)
    • c4go/ast/cxx_this_expr.go
    • Line 3: warning: comment on exported type CXXThisExpr should be of the form "CXXThisExpr ..." (with optional leading article) (golint)
    • c4go/unused.go
    • Line 95: warning: exported type CallSearcher should have comment or be unexported (golint)
    • Line 99: warning: exported var GoFuncs should have comment or be unexported (golint)
    • Line 108: warning: exported method CallSearcher.Visit should have comment or be unexported (golint)

gocyclo91%

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.

    • c4go/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)
    • c4go/transpiler/operators.go
    • Line 420: warning: cyclomatic complexity 82 of function atomicOperation() is high (> 15) (gocyclo)
    • Line 310: warning: cyclomatic complexity 35 of function getTokenForOperator() is high (> 15) (gocyclo)
    • Line 86: warning: cyclomatic complexity 21 of function transpileConditionalOperator() is high (> 15) (gocyclo)
    • c4go/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)
    • c4go/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)
    • c4go/transpiler/value_to_pointer.go
    • Line 179: warning: cyclomatic complexity 26 of function GetPointerAddress() is high (> 15) (gocyclo)
    • Line 622: warning: cyclomatic complexity 21 of function pointerArithmetic() is high (> 15) (gocyclo)
    • Line 490: warning: cyclomatic complexity 18 of function PntBitCast() is high (> 15) (gocyclo)
    • Line 373: warning: cyclomatic complexity 16 of function PntCmpPnt() is high (> 15) (gocyclo)
    • c4go/transpiler/declarations.go
    • Line 107: warning: cyclomatic complexity 45 of function transpileRecordDecl() is high (> 15) (gocyclo)
    • Line 572: warning: cyclomatic complexity 38 of function transpileVarDecl() is high (> 15) (gocyclo)
    • Line 426: warning: cyclomatic complexity 16 of function transpileTypedefDecl() is high (> 15) (gocyclo)
    • c4go/unused.go
    • Line 12: warning: cyclomatic complexity 18 of function unused() is high (> 15) (gocyclo)
    • c4go/transpiler/switch.go
    • Line 195: warning: cyclomatic complexity 32 of function transpileSwitchStmt() is high (> 15) (gocyclo)
    • Line 88: warning: cyclomatic complexity 17 of function caseSplitter() is high (> 15) (gocyclo)
    • c4go/main_test.go
    • Line 52: warning: cyclomatic complexity 30 of function TestIntegrationScripts() is high (> 15) (gocyclo)
    • Line 312: warning: cyclomatic complexity 17 of function (ProgramArgs).runGoTest() is high (> 15) (gocyclo)
    • c4go/transpiler/call.go
    • Line 204: warning: cyclomatic complexity 73 of function transpileCallExpr() is high (> 15) (gocyclo)
    • Line 40: warning: cyclomatic complexity 21 of function getName() is high (> 15) (gocyclo)
    • Line 128: warning: cyclomatic complexity 18 of function simplificationCallExprPrintf() is high (> 15) (gocyclo)
    • c4go/transpiler/cast.go
    • Line 13: warning: cyclomatic complexity 39 of function transpileImplicitCastExpr() is high (> 15) (gocyclo)
    • Line 205: warning: cyclomatic complexity 31 of function transpileCStyleCastExpr() is high (> 15) (gocyclo)
    • c4go/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)
    • c4go/transpiler/transpiler.go
    • Line 495: warning: cyclomatic complexity 43 of function transpileToNode() is high (> 15) (gocyclo)
    • Line 182: warning: cyclomatic complexity 34 of function transpileToExpr() is high (> 15) (gocyclo)
    • Line 337: warning: cyclomatic complexity 32 of function transpileToStmt() is high (> 15) (gocyclo)
    • Line 23: warning: cyclomatic complexity 28 of function TranspileAST() is high (> 15) (gocyclo)
    • c4go/main.go
    • Line 563: warning: cyclomatic complexity 23 of function runCommand() is high (> 15) (gocyclo)
    • Line 268: warning: cyclomatic complexity 18 of function avoidGoKeywords() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!