qmuntal/gltf

View on GitHub
binary/slice.go

Summary

Maintainability
A
3 hrs
Test Coverage

Function Type has 94 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func Type(data any) (c gltf.ComponentType, t gltf.AccessorType, count uint32) {
    v := reflect.ValueOf(data)
    if v.Kind() != reflect.Slice {
        panic(fmt.Sprintf("go3mf: binary.Type expecting a slice but got %s", v.Kind()))
    }
Severity: Major
Found in binary/slice.go - About 2 hrs to fix

    Function MakeSliceBuffer has 5 return statements (exceeds 4 allowed).
    Open

    func MakeSliceBuffer(c gltf.ComponentType, t gltf.AccessorType, count uint32, buffer any) any {
        if buffer == nil {
            return MakeSlice(c, t, count)
        }
        c1, t1, count1 := Type(buffer)
    Severity: Major
    Found in binary/slice.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status