Preparing report...

Report for github.com/hpinc/go3mf

A+    Excellent!    Found 22 issues across 64 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!


golint70%

Golint is a linter for Go source code.

    • go3mf/spec/spec.go
    • Line 18: warning: exported type PropertyGroup should have comment or be unexported (golint)
    • Line 22: warning: comment on exported type ValidateSpec should be of the form "ValidateSpec ..." (with optional leading article) (golint)
    • Line 38: warning: exported type Relationship should have comment or be unexported (golint)
    • Line 56: warning: exported type ErrorWrapper should have comment or be unexported (golint)
    • go3mf/slices/slices.go
    • Line 14: warning: exported var DefaultExtension should have comment or be unexported (golint)
    • Line 24: warning: exported type Spec should have comment or be unexported (golint)
    • Line 27: warning: exported var ErrSliceExtRequired should have comment or be unexported (golint)
    • Line 110: warning: exported function GetObjectAttr should have comment or be unexported (golint)
    • go3mf/materials/decoder.go
    • Line 16: warning: exported method Spec.DecodeAttribute should have comment or be unexported (golint)
    • Line 20: warning: exported method Spec.CreateElementDecoder should have comment or be unexported (golint)
    • go3mf/beamlattice/beamlattice.go
    • Line 14: warning: exported var DefaultExtension should have comment or be unexported (golint)
    • Line 21: warning: exported var ErrLatticeObjType should have comment or be unexported (golint)
    • Line 32: warning: exported type Spec should have comment or be unexported (golint)
    • Line 99: warning: exported function GetBeamLattice should have comment or be unexported (golint)
    • go3mf/materials/materials.go
    • Line 20: warning: exported var DefaultExtension should have comment or be unexported (golint)
    • Line 30: warning: exported type Spec should have comment or be unexported (golint)
    • Line 33: warning: exported var ErrMultiBlend should have comment or be unexported (golint)
    • Line 169: warning: receiver name c should be consistent with previous receiver name r for ColorGroup (golint)
    • Line 192: warning: receiver name c should be consistent with previous receiver name r for CompositeMaterials (golint)
    • Line 216: warning: receiver name c should be consistent with previous receiver name r for MultiProperties (golint)
    • go3mf/core.go
    • Line 184: warning: exported type Extension should have comment or be unexported (golint)
    • Line 459: warning: exported function NewTriangle should have comment or be unexported (golint)
    • Line 464: warning: exported function NewTrianglePID should have comment or be unexported (golint)
    • Line 471: warning: exported method Triangle.SetIndices should have comment or be unexported (golint)
    • Line 477: warning: exported method Triangle.SetPID should have comment or be unexported (golint)
    • Line 481: warning: exported method Triangle.SetPIndices should have comment or be unexported (golint)
    • Line 487: warning: exported method Triangle.Indices should have comment or be unexported (golint)
    • Line 491: warning: exported method Triangle.PID should have comment or be unexported (golint)
    • Line 495: warning: exported method Triangle.PIndices should have comment or be unexported (golint)
    • go3mf/encoder.go
    • Line 487: warning: exported method BaseMaterials.Marshal3MF should have comment or be unexported (golint)
    • go3mf/production/production.go
    • Line 16: warning: exported var DefaultExtension should have comment or be unexported (golint)
    • Line 23: warning: exported var ErrUUID should have comment or be unexported (golint)
    • Line 32: warning: exported type Spec should have comment or be unexported (golint)
    • Line 44: warning: exported function GetBuildAttr should have comment or be unexported (golint)
    • Line 59: warning: exported function GetObjectAttr should have comment or be unexported (golint)
    • Line 75: warning: exported function GetItemAttr should have comment or be unexported (golint)
    • Line 93: warning: comment on exported type ComponentAttr should be of the form "ComponentAttr ..." (with optional leading article) (golint)
    • Line 100: warning: exported function GetComponentAttr should have comment or be unexported (golint)
    • go3mf/errors/errors.go
    • Line 41: warning: exported type Level should have comment or be unexported (golint)
    • Line 59: warning: exported type Error should have comment or be unexported (golint)
    • Line 65: warning: exported function Wrap should have comment or be unexported (golint)
    • Line 69: warning: exported function WrapIndex should have comment or be unexported (golint)
    • Line 86: warning: exported function WrapPath should have comment or be unexported (golint)
    • Line 120: warning: exported function NewMissingFieldError should have comment or be unexported (golint)
    • Line 124: warning: exported type MissingFieldError should have comment or be unexported (golint)
    • Line 132: warning: exported type ParseAttrError should have comment or be unexported (golint)
    • Line 137: warning: exported function NewParseAttrError should have comment or be unexported (golint)
    • go3mf/production/decoder.go
    • Line 13: warning: exported method Spec.CreateElementDecoder should have comment or be unexported (golint)
    • Line 17: warning: exported method Spec.DecodeAttribute should have comment or be unexported (golint)
    • go3mf/internal/xml/xml.go
    • Line 13: warning: exported type StartElement should have comment or be unexported (golint)
    • Line 18: warning: exported type XMLAttr should have comment or be unexported (golint)
    • Line 318: warning: exported method Decoder.RawToken should have comment or be unexported (golint)
    • go3mf/beamlattice/decoder.go
    • Line 15: warning: exported method Spec.DecodeAttribute should have comment or be unexported (golint)
    • Line 19: warning: exported method Spec.CreateElementDecoder should have comment or be unexported (golint)
    • go3mf/slices/decoder.go
    • Line 15: warning: exported method Spec.CreateElementDecoder should have comment or be unexported (golint)
    • Line 22: warning: exported method Spec.DecodeAttribute should have comment or be unexported (golint)

gocyclo87%

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.

    • go3mf/internal/xml/xml.go
    • Line 318: warning: cyclomatic complexity 45 of function (*Decoder).RawToken() is high (> 15) (gocyclo)
    • Line 558: warning: cyclomatic complexity 36 of function (*Decoder).text() is high (> 15) (gocyclo)
    • Line 705: warning: cyclomatic complexity 27 of function (*Decoder).name() is high (> 15) (gocyclo)
    • go3mf/beamlattice/decoder.go
    • Line 122: warning: cyclomatic complexity 20 of function (*beamDecoder).Start() is high (> 15) (gocyclo)
    • Line 31: warning: cyclomatic complexity 16 of function (*beamLatticeDecoder).Start() is high (> 15) (gocyclo)
    • go3mf/validate.go
    • Line 246: warning: cyclomatic complexity 22 of function (*Object).validateMesh() is high (> 15) (gocyclo)
    • Line 202: warning: cyclomatic complexity 19 of function (*Object).Validate() is high (> 15) (gocyclo)
    • go3mf/read.go
    • Line 64: warning: cyclomatic complexity 21 of function decodeModelFile() 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!


misspell96%

Misspell Finds commonly misspelled English words

    • go3mf/core.go
    • Line 195: warning: "usefull" is a misspelling of "useful" (misspell)
    • Line 206: warning: "usefull" is a misspelling of "useful" (misspell)