Preparing report...

Report for github.com/linuxboot/cbfs

A    Great!    Found 15 issues across 18 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!


gocyclo88%

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.


golint16%

Golint is a linter for Go source code.

    • cbfs/pkg/cbfs/bootblock.go
    • Line 14: warning: exported function NewBootBlock should have comment or be unexported (golint)
    • Line 32: warning: exported method BootBlockRecord.GetFile should have comment or be unexported (golint)
    • cbfs/pkg/cbfs/stage.go
    • Line 18: warning: exported function NewLegacyStageRecord should have comment or be unexported (golint)
    • Line 47: warning: receiver name h should be consistent with previous receiver name r for LegacyStageRecord (golint)
    • Line 59: warning: exported method LegacyStageRecord.GetFile should have comment or be unexported (golint)
    • Line 63: warning: exported function NewStageRecord should have comment or be unexported (golint)
    • Line 80: warning: receiver name h should be consistent with previous receiver name r for StageRecord (golint)
    • Line 89: warning: exported method StageRecord.GetFile should have comment or be unexported (golint)
    • cbfs/pkg/cbfs/types.go
    • Line 10: warning: exported type Props should have comment or be unexported (golint)
    • Line 15: warning: exported type Compression should have comment or be unexported (golint)
    • Line 18: warning: exported const None should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported var Endian should have comment or be unexported (golint)
    • Line 25: warning: comment on exported type FileType should be of the form "FileType ..." (with optional leading article) (golint)
    • Line 32: warning: comment on exported const TypeDeleted2 should be of the form "TypeDeleted2 ..." (golint)
    • Line 34: warning: exported const TypeDeleted should have comment (or a comment on this block) or be unexported (golint)
    • Line 59: warning: exported const HeaderMagic should have comment (or a comment on this block) or be unexported (golint)
    • Line 81: warning: exported const FileMagic should have comment or be unexported (golint)
    • Line 83: warning: exported const FileSize should have comment or be unexported (golint)
    • Line 85: warning: exported type FileHeader should have comment or be unexported (golint)
    • Line 93: warning: exported type File should have comment or be unexported (golint)
    • Line 101: warning: comment on exported type FileAttr should be of the form "FileAttr ..." (with optional leading article) (golint)
    • Line 110: warning: exported type Tag should have comment or be unexported (golint)
    • Line 113: warning: exported const Unused should have comment (or a comment on this block) or be unexported (golint)
    • Line 122: warning: exported type FileAttrCompression should have comment or be unexported (golint)
    • Line 129: warning: exported type FileAttrHash should have comment or be unexported (golint)
    • Line 136: warning: exported type FileAttrPos should have comment or be unexported (golint)
    • Line 142: warning: exported type FileAttrAlign should have comment or be unexported (golint)
    • Line 148: warning: exported type FileAttrStageHeader should have comment or be unexported (golint)
    • Line 161: warning: comment on exported const MasterHeaderLen should be of the form "MasterHeaderLen ..." (golint)
    • Line 166: warning: exported type MasterHeader should have comment or be unexported (golint)
    • Line 177: warning: exported type MasterRecord should have comment or be unexported (golint)
    • Line 182: warning: exported type Architecture should have comment or be unexported (golint)
    • Line 185: warning: exported const X86 should have comment (or a comment on this block) or be unexported (golint)
    • Line 189: warning: exported type StageHeader should have comment or be unexported (golint)
    • Line 197: warning: exported type LegacyStageRecord should have comment or be unexported (golint)
    • Line 203: warning: exported type StageRecord should have comment or be unexported (golint)
    • Line 209: warning: exported type RawRecord should have comment or be unexported (golint)
    • Line 213: warning: exported type EmptyRecord should have comment or be unexported (golint)
    • Line 217: warning: exported type CMOSLayoutRecord should have comment or be unexported (golint)
    • Line 221: warning: exported type MicrocodeRecord should have comment or be unexported (golint)
    • Line 225: warning: exported type BootBlockRecord should have comment or be unexported (golint)
    • Line 229: warning: exported type SPDRecord should have comment or be unexported (golint)
    • Line 233: warning: exported type FSPRecord should have comment or be unexported (golint)
    • Line 237: warning: exported type PayloadHeader should have comment or be unexported (golint)
    • Line 246: warning: exported type PayloadRecord should have comment or be unexported (golint)
    • Line 252: warning: comment on exported type SegmentType should be of the form "SegmentType ..." (with optional leading article) (golint)
    • Line 258: warning: exported const SegCode should have comment (or a comment on this block) or be unexported (golint)
    • Line 281: warning: exported type OptionRom should have comment or be unexported (golint)
    • Line 287: warning: comment on exported type ReadWriter should be of the form "ReadWriter ..." (with optional leading article) (golint)
    • Line 295: warning: exported type Image should have comment or be unexported (golint)
    • cbfs/pkg/cbfs/image.go
    • Line 13: warning: exported type SegReader should have comment or be unexported (golint)
    • Line 19: warning: exported var SegReaders should have comment or be unexported (golint)
    • Line 21: warning: exported function RegisterFileReader should have comment or be unexported (golint)
    • Line 30: warning: exported function NewImage should have comment or be unexported (golint)
    • Line 121: warning: exported method Image.WriteFile should have comment or be unexported (golint)
    • Line 165: warning: exported method FileHeader.Deleted should have comment or be unexported (golint)
    • Line 170: warning: exported method Image.Remove should have comment or be unexported (golint)
    • cbfs/pkg/cbfs/empty.go
    • Line 17: warning: exported function NewEmptyRecord should have comment or be unexported (golint)
    • Line 38: warning: exported method EmptyRecord.GetFile should have comment or be unexported (golint)
    • cbfs/pkg/cbfs/raw.go
    • Line 14: warning: exported function NewRaw should have comment or be unexported (golint)
    • Line 31: warning: exported method RawRecord.GetFile should have comment or be unexported (golint)
    • cbfs/pkg/cbfs/cmoslayout.go
    • Line 14: warning: exported function NewCMOSLayout should have comment or be unexported (golint)
    • Line 31: warning: exported method CMOSLayoutRecord.GetFile should have comment or be unexported (golint)
    • cbfs/pkg/cbfs/fns.go
    • Line 10: warning: exported var Debug should have comment or be unexported (golint)
    • Line 112: warning: comment on exported function ReadName should be of the form "ReadName ..." (golint)
    • Line 133: warning: exported function ReadAttributes should have comment or be unexported (golint)
    • Line 154: warning: exported function ReadData should have comment or be unexported (golint)
    • cbfs/pkg/cbfs/master.go
    • Line 14: warning: exported function NewMaster should have comment or be unexported (golint)
    • Line 36: warning: exported method MasterRecord.GetFile should have comment or be unexported (golint)
    • cbfs/pkg/cbfs/payload.go
    • Line 15: warning: exported function NewPayloadRecord should have comment or be unexported (golint)
    • Line 50: warning: receiver name h should be consistent with previous receiver name p for PayloadRecord (golint)
    • Line 69: warning: receiver name r should be consistent with previous receiver name p for PayloadRecord (golint)
    • Line 76: warning: exported method PayloadRecord.GetFile should have comment or be unexported (golint)
    • Line 76: warning: receiver name r should be consistent with previous receiver name p for PayloadRecord (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!