Report for github.com/db47h/decimal

A+    Excellent!    Found 14 issues across 29 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


golint65%

Golint is a linter for Go source code.

    • decimal/dec.go
    • Line 60: warning: receiver name x should be consistent with previous receiver name z for dec (golint)
    • Line 67: warning: receiver name x should be consistent with previous receiver name z for dec (golint)
    • Line 79: warning: receiver name x should be consistent with previous receiver name z for dec (golint)
    • Line 132: warning: receiver name x should be consistent with previous receiver name z for dec (golint)
    • Line 219: warning: receiver name x should be consistent with previous receiver name z for dec (golint)
    • Line 293: warning: receiver name x should be consistent with previous receiver name z for dec (golint)
    • Line 431: warning: receiver name q should be consistent with previous receiver name z for dec (golint)
    • Line 495: warning: receiver name x should be consistent with previous receiver name z for dec (golint)
    • Line 1068: warning: receiver name x should be consistent with previous receiver name z for dec (golint)
    • decimal/dec_arith_test.go
    • Line 245: warning: don't use underscores in Go names; var shl10VW_g should be shl10VWG (golint)
    • Line 253: warning: don't use underscores in Go names; var shr10VW_g should be shr10VWG (golint)
    • decimal/dec_conv.go
    • Line 171: warning: receiver name x should be consistent with previous receiver name z for dec (golint)
    • Line 176: warning: receiver name x should be consistent with previous receiver name z for dec (golint)
    • Line 224: warning: receiver name q should be consistent with previous receiver name z for dec (golint)
    • decimal/decimal.go
    • Line 26: warning: comment on exported type Decimal should be of the form "Decimal ..." (with optional leading article) (golint)
    • Line 101: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 312: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 347: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 366: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 428: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 489: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 504: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 520: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 562: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 584: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 636: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 642: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 660: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 682: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 701: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 709: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 834: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 933: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 1310: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 1324: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 1400: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 1442: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • Line 1638: warning: receiver name x should be consistent with previous receiver name z for Decimal (golint)
    • decimal/arith.go
    • Line 44: warning: don't use underscores in Go names; func mulWW_g should be mulWWG (golint)
    • Line 50: warning: don't use underscores in Go names; func mulAddWWW_g should be mulAddWWWG (golint)
    • Line 64: warning: don't use underscores in Go names; func divWW_g should be divWWG (golint)
    • Line 70: warning: don't use underscores in Go names; func addVV_g should be addVVG (golint)
    • Line 81: warning: don't use underscores in Go names; func subVV_g should be subVVG (golint)
    • Line 92: warning: don't use underscores in Go names; func addVW_g should be addVWG (golint)
    • Line 125: warning: don't use underscores in Go names; func subVW_g should be subVWG (golint)
    • Line 152: warning: don't use underscores in Go names; func shlVU_g should be shlVUG (golint)
    • Line 171: warning: don't use underscores in Go names; func shrVU_g should be shrVUG (golint)
    • Line 190: warning: don't use underscores in Go names; func mulAddVWW_g should be mulAddVWWG (golint)
    • Line 199: warning: don't use underscores in Go names; func addMulVVW_g should be addMulVVWG (golint)
    • Line 210: warning: don't use underscores in Go names; func divWVW_g should be divWVWG (golint)
    • decimal/arith_test.go
    • Line 202: warning: don't use underscores in Go names; var shlVW_g should be shlVWG (golint)
    • Line 210: warning: don't use underscores in Go names; var shrVW_g should be shrVWG (golint)
    • decimal/dec_arith.go
    • Line 203: warning: don't use underscores in Go names; func mul10WW_g should be mul10WWG (golint)
    • Line 209: warning: don't use underscores in Go names; func div10WW_g should be div10WWG (golint)
    • Line 216: warning: don't use underscores in Go names; func add10WWW_g should be add10WWWG (golint)
    • Line 230: warning: don't use underscores in Go names; func add10VV_g should be add10VVG (golint)
    • Line 237: warning: don't use underscores in Go names; func sub10WWW_g should be sub10WWWG (golint)
    • Line 246: warning: don't use underscores in Go names; func sub10VV_g should be sub10VVG (golint)
    • Line 254: warning: don't use underscores in Go names; func add10VW_g should be add10VWG (golint)
    • Line 273: warning: don't use underscores in Go names; func sub10VW_g should be sub10VWG (golint)
    • Line 289: warning: don't use underscores in Go names; func shl10VU_g should be shl10VUG (golint)
    • Line 311: warning: don't use underscores in Go names; func shr10VU_g should be shr10VUG (golint)
    • Line 332: warning: don't use underscores in Go names; func mulAdd10VWW_g should be mulAdd10VWWG (golint)
    • Line 342: warning: don't use underscores in Go names; func addMul10VVW_g should be addMul10VVWG (golint)
    • Line 352: warning: don't use underscores in Go names; func div10VWW_g should be div10VWWG (golint)
    • Line 377: warning: don't use underscores in Go names; func div10W_g should be div10WG (golint)
    • Line 412: warning: don't use underscores in Go names; func mulAdd10WWW_g should be mulAdd10WWWG (golint)
    • decimal/decimal_marsh.go
    • Line 64: warning: receiver name z should be consistent with previous receiver name x for Decimal (golint)
    • Line 113: warning: receiver name z should be consistent with previous receiver name x for Decimal (golint)
    • decimal/intdec_test.go
    • Line 45: warning: receiver name x should be consistent with previous receiver name z for IDec (golint)
    • Line 77: warning: receiver name x should be consistent with previous receiver name z for IDec (golint)
    • Line 135: warning: receiver name x should be consistent with previous receiver name z for IDec (golint)
    • Line 139: warning: receiver name x should be consistent with previous receiver name z for IDec (golint)
    • Line 191: warning: receiver name x should be consistent with previous receiver name z for IDec (golint)
    • Line 242: warning: receiver name x should be consistent with previous receiver name z for IDec (golint)

gocyclo72%

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.

    • decimal/decimal_test.go
    • Line 388: warning: cyclomatic complexity 17 of function testDecimalRound() is high (> 15) (gocyclo)
    • Line 1644: warning: cyclomatic complexity 16 of function TestDecimalArithmeticSpecialValues() is high (> 15) (gocyclo)
    • decimal/decimal_toa.go
    • Line 57: warning: cyclomatic complexity 27 of function (*Decimal).Append() is high (> 15) (gocyclo)
    • Line 362: warning: cyclomatic complexity 22 of function (*Decimal).Format() is high (> 15) (gocyclo)
    • decimal/decimal.go
    • Line 1496: warning: cyclomatic complexity 23 of function (*Decimal).round() is high (> 15) (gocyclo)
    • Line 1332: warning: cyclomatic complexity 18 of function (*Decimal).Sub() is high (> 15) (gocyclo)
    • Line 130: warning: cyclomatic complexity 18 of function (*Decimal).Add() is high (> 15) (gocyclo)
    • decimal/dec.go
    • Line 812: warning: cyclomatic complexity 17 of function (dec).divRecursiveStep() 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!