Preparing report...

Report for github.com/itchio/wharf

A    Great!    Found 51 issues across 82 files

Tweet

gofmt85%

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!


gocyclo86%

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.

    • wharf/pwr/bowl/bowl_overlay.go
    • Line 447: warning: cyclomatic complexity 31 of function (*overlayBowl).applyTranspositions() is high (> 15) (gocyclo)
    • Line 329: warning: cyclomatic complexity 18 of function (*overlayBowl).ensureDirsAndSymlinks() is high (> 15) (gocyclo)
    • wharf/pwr/rediff/rediff.go
    • Line 295: warning: cyclomatic complexity 38 of function (*context).Optimize() is high (> 15) (gocyclo)
    • Line 131: warning: cyclomatic complexity 35 of function (*context).analyzePatch() is high (> 15) (gocyclo)
    • wharf/archiver/zip.go
    • Line 22: warning: cyclomatic complexity 39 of function ExtractZip() is high (> 15) (gocyclo)
    • Line 256: warning: cyclomatic complexity 16 of function CompressZip() is high (> 15) (gocyclo)
    • wharf/bsdiff/math.go
    • Line 158: warning: cyclomatic complexity 30 of function qsufsort() is high (> 15) (gocyclo)
    • Line 17: warning: cyclomatic complexity 21 of function split() is high (> 15) (gocyclo)

golint52%

Golint is a linter for Go source code.

    • wharf/pwr/patcher/simple.go
    • Line 11: warning: exported type PatchFreshParams should have comment or be unexported (golint)
    • Line 20: warning: exported function PatchFresh should have comment or be unexported (golint)
    • wharf/wire/message_source.go
    • Line 10: warning: exported type MessageReader should have comment or be unexported (golint)
    • Line 32: warning: exported type MessageReaderCheckpoint should have comment or be unexported (golint)
    • wharf/wtest/fsgen.go
    • Line 19: warning: comment on exported const BlockSize should be of the form "BlockSize ..." (golint)
    • Line 23: warning: exported var TestSymlinks should have comment or be unexported (golint)
    • Line 25: warning: exported type TestDirEntry should have comment or be unexported (golint)
    • Line 45: warning: comment on exported type Bsmod should be of the form "Bsmod ..." (with optional leading article) (golint)
    • Line 58: warning: exported type TestDirChunk should have comment or be unexported (golint)
    • Line 63: warning: exported type TestDirSettings should have comment or be unexported (golint)
    • Line 68: warning: exported function MakeTestDir should have comment or be unexported (golint)
    • Line 188: warning: exported function WipeAndMkdir should have comment or be unexported (golint)
    • Line 193: warning: exported function WipeAndCpDir should have comment or be unexported (golint)
    • Line 199: warning: exported function CpFile should have comment or be unexported (golint)
    • Line 215: warning: exported function CpDir should have comment or be unexported (golint)
    • Line 251: warning: exported function AssertDirEmpty should have comment or be unexported (golint)
    • wharf/pwr/bowl/bowl_overlay.go
    • Line 52: warning: exported type OverlayBowlCheckpoint should have comment or be unexported (golint)
    • Line 60: warning: exported type OverlayBowlParams should have comment or be unexported (golint)
    • Line 70: warning: exported function NewOverlayBowl should have comment or be unexported (golint)
    • Line 393: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 914: warning: exported type OverlayEntryWriterCheckpoint should have comment or be unexported (golint)
    • wharf/pwr/archive_healer.go
    • Line 111: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 379: warning: exported method ArchiveHealer.SetLockMap should have comment or be unexported (golint)
    • wharf/pwr/hashinfo.go
    • Line 9: warning: exported type HashInfo should have comment or be unexported (golint)
    • Line 14: warning: exported type HashGroups should have comment or be unexported (golint)
    • Line 16: warning: exported function ComputeHashInfo should have comment or be unexported (golint)
    • wharf/bsdiff/patch.go
    • Line 24: warning: exported type PatchContext should have comment or be unexported (golint)
    • Line 29: warning: exported function NewPatchContext should have comment or be unexported (golint)
    • Line 35: warning: exported type IndividualPatchContext should have comment or be unexported (golint)
    • Line 41: warning: exported method PatchContext.NewIndividualPatchContext should have comment or be unexported (golint)
    • Line 77: warning: exported method IndividualPatchContext.Apply should have comment or be unexported (golint)
    • wharf/bsdiff/suffixarrayz.go
    • Line 3: warning: exported const Cutoff should have comment or be unexported (golint)
    • Line 5: warning: exported type SuffixArrayZ should have comment or be unexported (golint)
    • Line 11: warning: exported function NewSuffixArrayZ should have comment or be unexported (golint)
    • wharf/wire/read_context.go
    • Line 70: warning: exported method ReadContext.GetSource should have comment or be unexported (golint)
    • Line 74: warning: exported method ReadContext.Resume should have comment or be unexported (golint)
    • Line 123: warning: exported method ReadContext.WantSave should have comment or be unexported (golint)
    • Line 131: warning: exported method ReadContext.PopCheckpoint should have comment or be unexported (golint)
    • wharf/archiver/zip.go
    • Line 22: warning: exported function ExtractZip should have comment or be unexported (golint)
    • Line 256: warning: exported function CompressZip should have comment or be unexported (golint)
    • wharf/pwr/safekeeper.go
    • Line 13: warning: exported type SafeKeeperOpen should have comment or be unexported (golint)
    • Line 34: warning: exported type SafeKeeperParams should have comment or be unexported (golint)
    • Line 39: warning: exported function NewSafeKeeper should have comment or be unexported (golint)
    • wharf/ctxcopy/ctxcopy.go
    • Line 12: warning: exported function Do should have comment or be unexported (golint)
    • Line 16: warning: exported function DoBuffer should have comment or be unexported (golint)
    • wharf/pwr/bowl/bowl.go
    • Line 8: warning: exported type Bowl should have comment or be unexported (golint)
    • Line 22: warning: exported type EntryWriter should have comment or be unexported (golint)
    • Line 30: warning: exported var ErrUninitializedWriter should have comment or be unexported (golint)
    • Line 32: warning: exported type BowlCheckpoint should have comment or be unexported (golint)
    • Line 36: warning: exported type WriterCheckpoint should have comment or be unexported (golint)
    • Line 41: warning: exported type Transposition should have comment or be unexported (golint)
    • wharf/archiver/archiver.go
    • Line 27: warning: exported type ExtractResult should have comment or be unexported (golint)
    • Line 33: warning: exported type CompressResult should have comment or be unexported (golint)
    • Line 38: warning: exported type UncompressedSizeKnownFunc should have comment or be unexported (golint)
    • Line 40: warning: exported type EntryDoneFunc should have comment or be unexported (golint)
    • Line 42: warning: exported type ExtractSettings should have comment or be unexported (golint)
    • Line 51: warning: exported function ExtractPath should have comment or be unexported (golint)
    • Line 84: warning: exported function Extract should have comment or be unexported (golint)
    • Line 92: warning: exported function Mkdir should have comment or be unexported (golint)
    • Line 120: warning: exported function Symlink should have comment or be unexported (golint)
    • Line 141: warning: exported function CopyFile should have comment or be unexported (golint)
    • wharf/pwr/blockvalidator.go
    • Line 15: warning: exported type BlockValidator should have comment or be unexported (golint)
    • Line 21: warning: exported function NewBlockValidator should have comment or be unexported (golint)
    • wharf/bsdiff/lrufile/lrufile.go
    • Line 12: warning: exported type File should have comment or be unexported (golint)
    • Line 18: warning: exported type Stats should have comment or be unexported (golint)
    • Line 43: warning: exported function New should have comment or be unexported (golint)
    • wharf/pwr/validatingpool.go
    • Line 14: warning: exported type OnCloseFunc should have comment or be unexported (golint)
    • Line 16: warning: exported type WoundsFilterFunc should have comment or be unexported (golint)
    • wharf/pwr/genie/types.go
    • Line 9: warning: exported type BlockOrigin should have comment or be unexported (golint)
    • Line 15: warning: exported method BlockOrigin.GetSize should have comment or be unexported (golint)
    • Line 19: warning: exported type FreshOrigin should have comment or be unexported (golint)
    • Line 23: warning: exported method FreshOrigin.GetSize should have comment or be unexported (golint)
    • Line 27: warning: exported type Origin should have comment or be unexported (golint)
    • Line 31: warning: exported type Composition should have comment or be unexported (golint)
    • Line 38: warning: exported method Composition.Append should have comment or be unexported (golint)
    • wharf/archiver/tar.go
    • Line 19: warning: comment on exported function ExtractTar should be of the form "ExtractTar ..." (golint)
    • Line 93: warning: exported function CompressTar should have comment or be unexported (golint)
    • wharf/wsync/algo.go
    • Line 70: warning: exported method Context.ApplySingle should have comment or be unexported (golint)
    • Line 74: warning: exported method Context.ApplySingleFull should have comment or be unexported (golint)
    • wharf/bsdiff/psa.go
    • Line 5: warning: comment on exported type PSA should be of the form "PSA ..." (with optional leading article) (golint)
    • Line 15: warning: exported type BucketGroup should have comment or be unexported (golint)
    • Line 20: warning: exported function NewPSA should have comment or be unexported (golint)
    • wharf/pwr/overlay/overlay_patch.go
    • Line 12: warning: exported type OverlayPatchContext should have comment or be unexported (golint)
    • Line 16: warning: exported method OverlayPatchContext.Patch should have comment or be unexported (golint)
    • wharf/pwr/rediff/rediff.go
    • Line 58: warning: exported type Context should have comment or be unexported (golint)
    • Line 68: warning: exported type Params should have comment or be unexported (golint)
    • Line 94: warning: exported type OptimizeParams should have comment or be unexported (golint)
    • Line 101: warning: exported const DefaultRediffSizeLimit should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words