Preparing report...

Report for github.com/bokuweb/gopher-boy

A+    Excellent!    Found 18 issues across 35 files

Tweet

gofmt97%

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!


gocyclo97%

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.

    • gopher-boy/pkg/bus/bus.go
    • Line 91: warning: cyclomatic complexity 26 of function (*Bus).ReadByte() is high (> 15) (gocyclo)
    • Line 147: warning: cyclomatic complexity 24 of function (*Bus).WriteByte() is high (> 15) (gocyclo)

golint60%

Golint is a linter for Go source code.

    • gopher-boy/pkg/pad/pad.go
    • Line 15: warning: exported type Pad should have comment or be unexported (golint)
    • Line 28: warning: exported type Button should have comment or be unexported (golint)
    • Line 78: warning: exported method Pad.Press should have comment or be unexported (golint)
    • Line 82: warning: exported method Pad.Release should have comment or be unexported (golint)
    • gopher-boy/pkg/cartridge/cartridge.go
    • Line 18: warning: comment on exported type CartridgeType should be of the form "CartridgeType ..." (with optional leading article) (golint)
    • Line 46: warning: exported const MBC_0 should have comment (or a comment on this block) or be unexported (golint)
    • Line 109: warning: exported method Cartridge.ReadByte should have comment or be unexported (golint)
    • Line 113: warning: exported method Cartridge.WriteByte should have comment or be unexported (golint)
    • gopher-boy/pkg/cpu/cpu.go
    • Line 48: warning: exported type Cycle should have comment or be unexported (golint)
    • Line 655: warning: don't use underscores in Go names; method ldnn_n should be ldnnN (golint)
    • Line 665: warning: don't use underscores in Go names; method ldn_nn should be ldnNn (golint)
    • Line 670: warning: don't use underscores in Go names; method ldrr_r should be ldrrR (golint)
    • Line 682: warning: don't use underscores in Go names; method inc_nn should be incNn (golint)
    • Line 698: warning: don't use underscores in Go names; method inc_n should be incN (golint)
    • Line 702: warning: don't use underscores in Go names; method dec_n should be decN (golint)
    • Line 721: warning: don't use underscores in Go names; method ldnn_sp should be ldnnSp (golint)
    • Line 726: warning: don't use underscores in Go names; method addhl_rr should be addhlRr (golint)
    • Line 739: warning: don't use underscores in Go names; method ldr_rr should be ldrRr (golint)
    • Line 750: warning: don't use underscores in Go names; method lda_nn should be ldaNn (golint)
    • Line 762: warning: don't use underscores in Go names; method dec_nn should be decNn (golint)
    • Line 831: warning: don't use underscores in Go names; method jr_n should be jrN (golint)
    • Line 883: warning: don't use underscores in Go names; method jrcc_n should be jrccN (golint)
    • Line 900: warning: don't use underscores in Go names; method ldihl_a should be ldihlA (golint)
    • Line 948: warning: don't use underscores in Go names; method ldia_hl should be ldiaHl (golint)
    • Line 974: warning: don't use underscores in Go names; method ldsp_nn should be ldspNn (golint)
    • Line 981: warning: don't use underscores in Go names; method lddhl_a should be lddhlA (golint)
    • Line 992: warning: don't use underscores in Go names; method inc_sp should be incSp (golint)
    • Line 1004: warning: don't use underscores in Go names; method inc_hl should be incHl (golint)
    • Line 1019: warning: don't use underscores in Go names; method dec_hl should be decHl (golint)
    • Line 1029: warning: don't use underscores in Go names; method ldhl_n should be ldhlN (golint)
    • Line 1057: warning: don't use underscores in Go names; method addhl_sp should be addhlSp (golint)
    • Line 1067: warning: don't use underscores in Go names; method ldda_hl should be lddaHl (golint)
    • Line 1078: warning: don't use underscores in Go names; method dec_sp should be decSp (golint)
    • Line 1092: warning: don't use underscores in Go names; method inc_r should be incR (golint)
    • Line 1106: warning: don't use underscores in Go names; method dec_r should be decR (golint)
    • Line 1116: warning: don't use underscores in Go names; method lda_n should be ldaN (golint)
    • Line 1167: warning: don't use underscores in Go names; method adda_n should be addaN (golint)
    • Line 1181: warning: don't use underscores in Go names; method adca_n should be adcaN (golint)
    • Line 1211: warning: don't use underscores in Go names; method sub_n should be subN (golint)
    • Line 1225: warning: don't use underscores in Go names; method subca_n should be subcaN (golint)
    • Line 1260: warning: don't use underscores in Go names; method and_n should be andN (golint)
    • Line 1274: warning: don't use underscores in Go names; method xor_n should be xorN (golint)
    • Line 1288: warning: don't use underscores in Go names; method or_n should be orN (golint)
    • Line 1304: warning: don't use underscores in Go names; method cp_n should be cpN (golint)
    • Line 1339: warning: don't use underscores in Go names; method pop_nn should be popNn (golint)
    • Line 1344: warning: don't use underscores in Go names; method pop_af should be popAf (golint)
    • Line 1358: warning: don't use underscores in Go names; method jpcc_nn should be jpccNn (golint)
    • Line 1369: warning: don't use underscores in Go names; method jp_nn should be jpNn (golint)
    • Line 1382: warning: don't use underscores in Go names; method callcc_nn should be callccNn (golint)
    • Line 1396: warning: don't use underscores in Go names; method push_nn should be pushNn (golint)
    • Line 1428: warning: don't use underscores in Go names; method call_nn should be callNn (golint)
    • Line 1438: warning: don't use underscores in Go names; method ret_i should be retI (golint)
    • Line 1450: warning: don't use underscores in Go names; method ldhn_a should be ldhnA (golint)
    • Line 1457: warning: don't use underscores in Go names; method ldc_a should be ldcA (golint)
    • Line 1472: warning: don't use underscores in Go names; method addsp_n should be addspN (golint)
    • Line 1500: warning: don't use underscores in Go names; method jp_hl should be jpHl (golint)
    • Line 1510: warning: don't use underscores in Go names; method ldnn_r should be ldnnR (golint)
    • Line 1520: warning: don't use underscores in Go names; method ldha_n should be ldhaN (golint)
    • Line 1528: warning: don't use underscores in Go names; method lda_c should be ldaC (golint)
    • Line 1564: warning: don't use underscores in Go names; method ldhlsp_n should be ldhlspN (golint)
    • Line 1590: warning: don't use underscores in Go names; method ldsp_hl should be ldspHl (golint)
    • Line 1618: warning: don't use underscores in Go names; method rlc_n should be rlcN (golint)
    • Line 1622: warning: don't use underscores in Go names; method rlc_hl should be rlcHl (golint)
    • Line 1652: warning: don't use underscores in Go names; method rrc_n should be rrcN (golint)
    • Line 1656: warning: don't use underscores in Go names; method rrc_hl should be rrcHl (golint)
    • Line 1689: warning: don't use underscores in Go names; method rl_n should be rlN (golint)
    • Line 1693: warning: don't use underscores in Go names; method rl_hl should be rlHl (golint)
    • Line 1725: warning: don't use underscores in Go names; method rr_n should be rrN (golint)
    • Line 1729: warning: don't use underscores in Go names; method rr_hl should be rrHl (golint)
    • Line 1758: warning: don't use underscores in Go names; method sla_n should be slaN (golint)
    • Line 1762: warning: don't use underscores in Go names; method sla_hl should be slaHl (golint)
    • Line 1791: warning: don't use underscores in Go names; method sra_n should be sraN (golint)
    • Line 1795: warning: don't use underscores in Go names; method sra_hl should be sraHl (golint)
    • Line 1822: warning: don't use underscores in Go names; method swap_n should be swapN (golint)
    • Line 1826: warning: don't use underscores in Go names; method swap_hl should be swapHl (golint)
    • Line 1855: warning: don't use underscores in Go names; method srl_n should be srlN (golint)
    • Line 1859: warning: don't use underscores in Go names; method srl_hl should be srlHl (golint)
    • Line 1881: warning: don't use underscores in Go names; method bit_b_r should be bitBR (golint)
    • Line 1885: warning: don't use underscores in Go names; method bit_b_hl should be bitBHl (golint)
    • Line 1897: warning: don't use underscores in Go names; method res_b should be resB (golint)
    • Line 1901: warning: don't use underscores in Go names; method res_b_r should be resBR (golint)
    • Line 1905: warning: don't use underscores in Go names; method res_b_hl should be resBHl (golint)
    • Line 1917: warning: don't use underscores in Go names; method set_b should be setB (golint)
    • Line 1921: warning: don't use underscores in Go names; method set_b_r should be setBR (golint)
    • Line 1925: warning: don't use underscores in Go names; method set_b_hl should be setBHl (golint)
    • Line 1945: warning: comment on exported method CPU.GetRegisters should be of the form "GetRegisters ..." (golint)
    • gopher-boy/pkg/mocks/bus.go
    • Line 7: warning: exported type MockBus should have comment or be unexported (golint)
    • Line 11: warning: exported method MockBus.WriteByte should have comment or be unexported (golint)
    • Line 15: warning: exported method MockBus.WriteWord should have comment or be unexported (golint)
    • Line 20: warning: exported method MockBus.ReadByte should have comment or be unexported (golint)
    • Line 24: warning: exported method MockBus.ReadWord should have comment or be unexported (golint)
    • Line 29: warning: exported method MockBus.SetMemory should have comment or be unexported (golint)
    • gopher-boy/pkg/gpu/gpu.go
    • Line 44: warning: comment on exported type GPUMode should be of the form "GPUMode ..." (with optional leading article) (golint)
    • Line 50: warning: comment on exported const VBlankMode should be of the form "VBlankMode ..." (golint)
    • Line 52: warning: exported const SearchingOAMMode should have comment (or a comment on this block) or be unexported (golint)
    • Line 97: warning: exported const TILEMAP0 should have comment (or a comment on this block) or be unexported (golint)
    • Line 291: warning: exported method GPU.DMAStarted should have comment or be unexported (golint)
    • Line 295: warning: exported method GPU.Transfer should have comment or be unexported (golint)
    • gopher-boy/pkg/interrupt/interrupt.go
    • Line 24: warning: exported const VerticalBlankFlag should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported const RegisterOffset should have comment (or a comment on this block) or be unexported (golint)
    • Line 72: warning: exported const InterruptFlagAddr should have comment (or a comment on this block) or be unexported (golint)
    • Line 119: warning: exported method Interrupt.HasIRQ should have comment or be unexported (golint)
    • Line 124: warning: exported method Interrupt.Enable should have comment or be unexported (golint)
    • Line 128: warning: exported method Interrupt.Enabled should have comment or be unexported (golint)
    • Line 132: warning: exported method Interrupt.Disable should have comment or be unexported (golint)
    • Line 136: warning: exported method Interrupt.ResolveISRAddr should have comment or be unexported (golint)
    • gopher-boy/pkg/types/types.go
    • Line 18: warning: exported type ImageData should have comment or be unexported (golint)
    • Line 20: warning: exported type Bit should have comment or be unexported (golint)
    • Line 23: warning: exported const Bit0 should have comment (or a comment on this block) or be unexported (golint)
    • gopher-boy/pkg/utils/byte.go
    • Line 5: warning: exported function Bytes2Word should have comment or be unexported (golint)
    • Line 9: warning: exported function Word2Bytes should have comment or be unexported (golint)

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!


misspell91%

Misspell Finds commonly misspelled English words