Preparing report...

Report for github.com/pokemium/mettaur

A+    Excellent!    Found 17 issues across 31 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!


gocyclo100%

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.

No problems detected. Good job!


golint45%

Golint is a linter for Go source code.

    • mettaur/pkg/gba/debug.go
    • Line 14: warning: exported const ROM should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type History should have comment or be unexported (golint)
    • Line 24: warning: exported type IRQHistory should have comment or be unexported (golint)
    • Line 148: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 154: warning: exported method GBA.PC should have comment or be unexported (golint)
    • Line 216: warning: exported method GBA.PanicHandler should have comment or be unexported (golint)
    • mettaur/pkg/gba/gba.go
    • Line 26: warning: exported type IRQID should have comment or be unexported (golint)
    • Line 63: warning: exported type Pipe should have comment or be unexported (golint)
    • Line 68: warning: exported type Inst should have comment or be unexported (golint)
    • Line 92: warning: exported method GBA.Exit should have comment or be unexported (golint)
    • Line 157: warning: exported method GBA.Reset should have comment or be unexported (golint)
    • Line 163: warning: exported method GBA.SoftReset should have comment or be unexported (golint)
    • Line 338: warning: exported method GBA.CartInfo should have comment or be unexported (golint)
    • Line 344: warning: exported method GBA.LoadSav should have comment or be unexported (golint)
    • mettaur/pkg/ram/gamepak.go
    • Line 3: warning: exported type FlashMode should have comment or be unexported (golint)
    • Line 6: warning: exported const Idle should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type GamePak should have comment or be unexported (golint)
    • Line 25: warning: exported method RAM.FlashRead should have comment or be unexported (golint)
    • Line 41: warning: exported method RAM.FlashWrite should have comment or be unexported (golint)
    • mettaur/pkg/gpu/debug.go
    • Line 9: warning: exported method GPU.PrintBGMap should have comment or be unexported (golint)
    • Line 30: warning: exported method GPU.PrintPalette should have comment or be unexported (golint)
    • mettaur/pkg/gpu/draw.go
    • Line 18: warning: exported const BlendOff should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported method GPU.Draw should have comment or be unexported (golint)
    • mettaur/pkg/gba/debug_decode.go
    • Line 126: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 165: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 197: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • mettaur/pkg/joypad/joypad.go
    • Line 10: warning: exported const A should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported type Joypad should have comment or be unexported (golint)
    • Line 70: warning: exported function Debug should have comment or be unexported (golint)
    • mettaur/pkg/ram/region.go
    • Line 3: warning: exported function BIOS should have comment or be unexported (golint)
    • Line 4: warning: exported function BIOSOffset should have comment or be unexported (golint)
    • Line 6: warning: exported function EWRAM should have comment or be unexported (golint)
    • Line 7: warning: exported function EWRAMOffset should have comment or be unexported (golint)
    • Line 9: warning: exported function IWRAM should have comment or be unexported (golint)
    • Line 10: warning: exported function IWRAMOffset should have comment or be unexported (golint)
    • Line 12: warning: exported function IO should have comment or be unexported (golint)
    • Line 13: warning: exported function IOOffset should have comment or be unexported (golint)
    • Line 15: warning: exported function Palette should have comment or be unexported (golint)
    • Line 16: warning: exported function PaletteOffset should have comment or be unexported (golint)
    • Line 18: warning: exported function VRAM should have comment or be unexported (golint)
    • Line 19: warning: exported function VRAMOffset should have comment or be unexported (golint)
    • Line 35: warning: exported function OAM should have comment or be unexported (golint)
    • Line 36: warning: exported function OAMOffset should have comment or be unexported (golint)
    • Line 38: warning: exported function GamePak0 should have comment or be unexported (golint)
    • Line 39: warning: exported function GamePak0Offset should have comment or be unexported (golint)
    • Line 41: warning: exported function GamePak1 should have comment or be unexported (golint)
    • Line 42: warning: exported function GamePak1Offset should have comment or be unexported (golint)
    • Line 44: warning: exported function GamePak2 should have comment or be unexported (golint)
    • Line 45: warning: exported function GamePak2Offset should have comment or be unexported (golint)
    • Line 47: warning: exported function SRAM should have comment or be unexported (golint)
    • Line 48: warning: exported function SRAMOffset should have comment or be unexported (golint)
    • mettaur/pkg/gba/timer.go
    • Line 9: warning: exported const SoundATimer should have comment (or a comment on this block) or be unexported (golint)
    • Line 104: warning: exported type Timers should have comment or be unexported (golint)
    • Line 108: warning: exported type Timer should have comment or be unexported (golint)
    • Line 128: warning: comment on exported function IsTimerIO should be of the form "IsTimerIO ..." (golint)
    • Line 130: warning: exported method Timers.GetIO should have comment or be unexported (golint)
    • Line 145: warning: exported method Timers.SetIO should have comment or be unexported (golint)
    • Line 170: warning: exported method GBA.Tick should have comment or be unexported (golint)
    • mettaur/pkg/ram/io.go
    • Line 10: warning: exported const BG1CNT should have its own declaration (golint)
    • Line 11: warning: exported const BG0VOFS should have its own declaration (golint)
    • Line 12: warning: exported const BG1VOFS should have its own declaration (golint)
    • Line 13: warning: exported const BG2VOFS should have its own declaration (golint)
    • Line 14: warning: exported const BG3VOFS should have its own declaration (golint)
    • Line 15: warning: exported const BG2PB should have its own declaration (golint)
    • Line 16: warning: exported const BG2Y should have its own declaration (golint)
    • Line 17: warning: exported const BG3PB should have its own declaration (golint)
    • Line 18: warning: exported const BG3Y should have its own declaration (golint)
    • Line 33: warning: exported const SOUND1CNT_H should have its own declaration (golint)
    • Line 34: warning: exported const SOUND2CNT_H should have its own declaration (golint)
    • Line 35: warning: exported const SOUND3CNT_H should have its own declaration (golint)
    • Line 36: warning: exported const SOUND4CNT_H should have its own declaration (golint)
    • Line 37: warning: exported const SOUNDCNT_H should have its own declaration (golint)
    • Line 40: warning: exported const FIFO_B should have its own declaration (golint)
    • Line 45: warning: exported const DMA0DAD should have its own declaration (golint)
    • Line 46: warning: exported const DMA1DAD should have its own declaration (golint)
    • Line 47: warning: exported const DMA2DAD should have its own declaration (golint)
    • Line 48: warning: exported const DMA3DAD should have its own declaration (golint)
    • Line 67: warning: exported const IF should have its own declaration (golint)
    • mettaur/pkg/util/util.go
    • Line 13: warning: exported var Mask should have comment or be unexported (golint)
    • Line 21: warning: exported function Contains should have comment or be unexported (golint)
    • Line 131: warning: exported function SetBit32 should have comment or be unexported (golint)
    • Line 139: warning: exported function SetBit8 should have comment or be unexported (golint)
    • Line 148: warning: exported function AddC should have comment or be unexported (golint)
    • Line 149: warning: exported function SubC should have comment or be unexported (golint)
    • Line 151: warning: exported function AddV should have comment or be unexported (golint)
    • Line 156: warning: exported function SubV should have comment or be unexported (golint)
    • Line 161: warning: exported function Align4 should have comment or be unexported (golint)
    • Line 162: warning: exported function Align2 should have comment or be unexported (golint)
    • Line 192: warning: exported function FillImage should have comment or be unexported (golint)
    • Line 200: warning: exported function AddInt32 should have comment or be unexported (golint)
    • mettaur/pkg/gpu/gpu.go
    • Line 12: warning: exported const BG1CNT should have its own declaration (golint)
    • Line 13: warning: exported const BG0VOFS should have its own declaration (golint)
    • Line 14: warning: exported const BG1VOFS should have its own declaration (golint)
    • Line 15: warning: exported const BG2VOFS should have its own declaration (golint)
    • Line 16: warning: exported const BG3VOFS should have its own declaration (golint)
    • Line 17: warning: exported const BG2PB should have its own declaration (golint)
    • Line 18: warning: exported const BG2Y should have its own declaration (golint)
    • Line 19: warning: exported const BG3PB should have its own declaration (golint)
    • Line 20: warning: exported const BG3Y should have its own declaration (golint)
    • Line 46: warning: exported function New should have comment or be unexported (golint)
    • Line 62: warning: exported method GPU.SetIO should have comment or be unexported (golint)
    • Line 79: warning: exported method GPU.SetVBlank should have comment or be unexported (golint)
    • Line 86: warning: exported method GPU.SetHBlank should have comment or be unexported (golint)
    • Line 93: warning: exported method GPU.SetVCounter should have comment or be unexported (golint)
    • mettaur/cmd/main.go
    • Line 119: warning: exported type Emulator should have comment or be unexported (golint)
    • Line 124: warning: exported method Emulator.Update should have comment or be unexported (golint)
    • Line 133: warning: exported method Emulator.Draw should have comment or be unexported (golint)
    • Line 138: warning: exported method Emulator.Layout should have comment or be unexported (golint)
    • Line 142: warning: exported method Emulator.SetupCloseHandler should have comment or be unexported (golint)
    • mettaur/pkg/gba/apu.go
    • Line 14: warning: exported const CPU_FREQ_HZ should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported const PSG_MAX should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported const SAMP_MAX should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported type APU should have comment or be unexported (golint)
    • Line 45: warning: exported type SoundChan should have comment or be unexported (golint)
    • mettaur/pkg/gba/dma.go
    • Line 16: warning: exported type DMA should have comment or be unexported (golint)
    • Line 22: warning: exported function NewDMA should have comment or be unexported (golint)
    • mettaur/pkg/gba/reg.go
    • Line 45: warning: exported function NewReg should have comment or be unexported (golint)
    • Line 77: warning: exported method Reg.Carry should have comment or be unexported (golint)
    • mettaur/pkg/ram/ram.go
    • Line 4: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 29: warning: exported function New should have comment or be unexported (golint)
    • Line 49: warning: exported method RAM.Get should have comment or be unexported (golint)
    • Line 112: warning: exported function BusWidth 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!