Showing 58 of 193 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func (m *MetaObject) SignalID(name, sig string) (uint32, error) {
    for _, signal := range m.Signals {
        if signal.Name == name &&
            signal.Signature == sig {
            return signal.Uid, nil
Severity: Major
Found in type/object/metaobject_decorator.go and 1 other location - About 2 hrs to fix
type/object/metaobject_decorator.go on lines 84..110

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 242.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func (m *MetaObject) PropertyID(name, sig string) (uint32, error) {
    for _, property := range m.Properties {
        if property.Name == name &&
            property.Signature == sig {
            return property.Uid, nil
Severity: Major
Found in type/object/metaobject_decorator.go and 1 other location - About 2 hrs to fix
type/object/metaobject_decorator.go on lines 54..78

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 242.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func nodifyProperty(nodes []signature.Node) signature.Node {
    if ok, err := checkError(nodes); ok {
        return fmt.Errorf("parse method: %s", err)
    }
    paramNode := nodes[3]
Severity: Major
Found in meta/idl/parser.go and 1 other location - About 2 hrs to fix
meta/idl/parser.go on lines 710..728

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 200.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func nodifySignal(nodes []signature.Node) signature.Node {
    if ok, err := checkError(nodes); ok {
        return fmt.Errorf("parse method: %s", err)
    }
    paramNode := nodes[3]
Severity: Major
Found in meta/idl/parser.go and 1 other location - About 2 hrs to fix
meta/idl/parser.go on lines 731..749

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 200.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func NewUint8Type() Type {
    return &typeConstructor{
        signature:    "C",
        signatureIDL: "uint8",
        typeName:     jen.Uint8(),
Severity: Major
Found in meta/signature/type.go and 9 other locations - About 2 hrs to fix
meta/signature/type.go on lines 133..149
meta/signature/type.go on lines 171..187
meta/signature/type.go on lines 190..206
meta/signature/type.go on lines 209..225
meta/signature/type.go on lines 228..244
meta/signature/type.go on lines 247..263
meta/signature/type.go on lines 266..282
meta/signature/type.go on lines 285..301
meta/signature/type.go on lines 304..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func NewDoubleType() Type {
    return &typeConstructor{
        signature:    "d",
        signatureIDL: "float64",
        typeName:     jen.Float64(),
Severity: Major
Found in meta/signature/type.go and 9 other locations - About 2 hrs to fix
meta/signature/type.go on lines 133..149
meta/signature/type.go on lines 152..168
meta/signature/type.go on lines 171..187
meta/signature/type.go on lines 190..206
meta/signature/type.go on lines 209..225
meta/signature/type.go on lines 228..244
meta/signature/type.go on lines 247..263
meta/signature/type.go on lines 266..282
meta/signature/type.go on lines 285..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func NewUint16Type() Type {
    return &typeConstructor{
        signature:    "W",
        signatureIDL: "uint16",
        typeName:     jen.Uint16(),
Severity: Major
Found in meta/signature/type.go and 9 other locations - About 2 hrs to fix
meta/signature/type.go on lines 133..149
meta/signature/type.go on lines 152..168
meta/signature/type.go on lines 171..187
meta/signature/type.go on lines 209..225
meta/signature/type.go on lines 228..244
meta/signature/type.go on lines 247..263
meta/signature/type.go on lines 266..282
meta/signature/type.go on lines 285..301
meta/signature/type.go on lines 304..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func NewLongType() Type {
    return &typeConstructor{
        signature:    "l",
        signatureIDL: "int64",
        typeName:     jen.Int64(),
Severity: Major
Found in meta/signature/type.go and 9 other locations - About 2 hrs to fix
meta/signature/type.go on lines 133..149
meta/signature/type.go on lines 152..168
meta/signature/type.go on lines 171..187
meta/signature/type.go on lines 190..206
meta/signature/type.go on lines 209..225
meta/signature/type.go on lines 228..244
meta/signature/type.go on lines 266..282
meta/signature/type.go on lines 285..301
meta/signature/type.go on lines 304..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func NewFloatType() Type {
    return &typeConstructor{
        signature:    "f",
        signatureIDL: "float32",
        typeName:     jen.Float32(),
Severity: Major
Found in meta/signature/type.go and 9 other locations - About 2 hrs to fix
meta/signature/type.go on lines 133..149
meta/signature/type.go on lines 152..168
meta/signature/type.go on lines 171..187
meta/signature/type.go on lines 190..206
meta/signature/type.go on lines 209..225
meta/signature/type.go on lines 228..244
meta/signature/type.go on lines 247..263
meta/signature/type.go on lines 266..282
meta/signature/type.go on lines 304..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func NewInt8Type() Type {
    return &typeConstructor{
        signature:    "c",
        signatureIDL: "int8",
        typeName:     jen.Int8(),
Severity: Major
Found in meta/signature/type.go and 9 other locations - About 2 hrs to fix
meta/signature/type.go on lines 152..168
meta/signature/type.go on lines 171..187
meta/signature/type.go on lines 190..206
meta/signature/type.go on lines 209..225
meta/signature/type.go on lines 228..244
meta/signature/type.go on lines 247..263
meta/signature/type.go on lines 266..282
meta/signature/type.go on lines 285..301
meta/signature/type.go on lines 304..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func NewUintType() Type {
    return &typeConstructor{
        signature:    "I",
        signatureIDL: "uint32",
        typeName:     jen.Uint32(),
Severity: Major
Found in meta/signature/type.go and 9 other locations - About 2 hrs to fix
meta/signature/type.go on lines 133..149
meta/signature/type.go on lines 152..168
meta/signature/type.go on lines 171..187
meta/signature/type.go on lines 190..206
meta/signature/type.go on lines 209..225
meta/signature/type.go on lines 247..263
meta/signature/type.go on lines 266..282
meta/signature/type.go on lines 285..301
meta/signature/type.go on lines 304..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func NewULongType() Type {
    return &typeConstructor{
        signature:    "L",
        signatureIDL: "uint64",
        typeName:     jen.Uint64(),
Severity: Major
Found in meta/signature/type.go and 9 other locations - About 2 hrs to fix
meta/signature/type.go on lines 133..149
meta/signature/type.go on lines 152..168
meta/signature/type.go on lines 171..187
meta/signature/type.go on lines 190..206
meta/signature/type.go on lines 209..225
meta/signature/type.go on lines 228..244
meta/signature/type.go on lines 247..263
meta/signature/type.go on lines 285..301
meta/signature/type.go on lines 304..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func NewInt16Type() Type {
    return &typeConstructor{
        signature:    "w",
        signatureIDL: "int16",
        typeName:     jen.Int16(),
Severity: Major
Found in meta/signature/type.go and 9 other locations - About 2 hrs to fix
meta/signature/type.go on lines 133..149
meta/signature/type.go on lines 152..168
meta/signature/type.go on lines 190..206
meta/signature/type.go on lines 209..225
meta/signature/type.go on lines 228..244
meta/signature/type.go on lines 247..263
meta/signature/type.go on lines 266..282
meta/signature/type.go on lines 285..301
meta/signature/type.go on lines 304..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

func NewIntType() Type {
    return &typeConstructor{
        signature:    "i",
        signatureIDL: "int32",
        typeName:     jen.Int32(),
Severity: Major
Found in meta/signature/type.go and 9 other locations - About 2 hrs to fix
meta/signature/type.go on lines 133..149
meta/signature/type.go on lines 152..168
meta/signature/type.go on lines 171..187
meta/signature/type.go on lines 190..206
meta/signature/type.go on lines 228..244
meta/signature/type.go on lines 247..263
meta/signature/type.go on lines 266..282
meta/signature/type.go on lines 285..301
meta/signature/type.go on lines 304..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 199.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func WriteN(w io.Writer, buf []byte, length int) error {
    size := 0
    for size < length {
        write, err := w.Write(buf[size:])
        size += write
Severity: Major
Found in type/basic/basic.go and 1 other location - About 2 hrs to fix
type/basic/basic.go on lines 16..36

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 198.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func ReadN(r io.Reader, buf []byte, length int) error {
    size := 0
    for size < length {
        read, err := r.Read(buf[size:])
        size += read
Severity: Major
Found in type/basic/basic.go and 1 other location - About 2 hrs to fix
type/basic/basic.go on lines 41..61

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 198.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func generatePropertyHelper(file *jen.File, itf *idl.InterfaceType,
    property idl.Property, propertyName string) error {
    tuple := property.Tuple()

    body, err := propertyBodyBlock(itf, property, propertyName)
Severity: Major
Found in meta/stub/stub.go and 1 other location - About 1 hr to fix
meta/stub/stub.go on lines 283..295

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 186.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func (s *StructType) Type() reflect.Type {
    fields := make([]reflect.StructField, len(s.Members))
    var offset uintptr = 0
    for i, m := range s.Members {
        typ := m.Type.Type()
Severity: Major
Found in meta/signature/type.go and 1 other location - About 1 hr to fix
meta/signature/type.go on lines 853..869

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 186.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func generateSignalHelper(file *jen.File, itf *idl.InterfaceType,
    signal idl.Signal, signalName string) error {
    tuple := signal.Tuple()

    body, err := signalBodyBlock(itf, signal, signalName)
Severity: Major
Found in meta/stub/stub.go and 1 other location - About 1 hr to fix
meta/stub/stub.go on lines 297..309

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 186.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func (t *TupleType) Type() reflect.Type {
    fields := make([]reflect.StructField, len(t.Members))
    var offset uintptr = 0
    for i, m := range t.Members {
        typ := m.Type.Type()
Severity: Major
Found in meta/signature/type.go and 1 other location - About 1 hr to fix
meta/signature/type.go on lines 1016..1032

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 186.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language