stdlib/zfuncs.go

Summary

Maintainability
A
0 mins
Test Coverage

File zfuncs.go has 511 lines of code (exceeds 500 allowed). Consider refactoring.
Invalid

// Code generated by 'go generate'; DO NOT EDIT.

package stdlib

import (
Severity: Minor
Found in stdlib/zfuncs.go - About 2 hrs to fix

    Similar blocks of code found in 4 locations. Consider refactoring.
    Wontfix

    func FuncPssRO(fn func(string, string) ugo.Object) ugo.CallableFunc {
        return func(args ...ugo.Object) (ret ugo.Object, err error) {
            if len(args) != 2 {
                return ugo.Undefined, ugo.ErrWrongNumArguments.NewError("want=2 got=" + strconv.Itoa(len(args)))
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 3 other locations - About 3 hrs to fix
    stdlib/zfuncs.go on lines 438..456
    stdlib/zfuncs.go on lines 473..491
    stdlib/zfuncs.go on lines 624..642

    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 258.

    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 4 locations. Consider refactoring.
    Wontfix

    func FuncPsrRO(fn func(string, rune) ugo.Object) ugo.CallableFunc {
        return func(args ...ugo.Object) (ret ugo.Object, err error) {
            if len(args) != 2 {
                return ugo.Undefined, ugo.ErrWrongNumArguments.NewError("want=2 got=" + strconv.Itoa(len(args)))
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 3 other locations - About 3 hrs to fix
    stdlib/zfuncs.go on lines 438..456
    stdlib/zfuncs.go on lines 473..491
    stdlib/zfuncs.go on lines 584..602

    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 258.

    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 4 locations. Consider refactoring.
    Wontfix

    func FuncPsiRO(fn func(string, int) ugo.Object) ugo.CallableFunc {
        return func(args ...ugo.Object) (ret ugo.Object, err error) {
            if len(args) != 2 {
                return ugo.Undefined, ugo.ErrWrongNumArguments.NewError("want=2 got=" + strconv.Itoa(len(args)))
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 3 other locations - About 3 hrs to fix
    stdlib/zfuncs.go on lines 473..491
    stdlib/zfuncs.go on lines 584..602
    stdlib/zfuncs.go on lines 624..642

    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 258.

    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 4 locations. Consider refactoring.
    Wontfix

    func FuncPi64i64RO(fn func(int64, int64) ugo.Object) ugo.CallableFunc {
        return func(args ...ugo.Object) (ret ugo.Object, err error) {
            if len(args) != 2 {
                return ugo.Undefined, ugo.ErrWrongNumArguments.NewError("want=2 got=" + strconv.Itoa(len(args)))
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 3 other locations - About 3 hrs to fix
    stdlib/zfuncs.go on lines 438..456
    stdlib/zfuncs.go on lines 584..602
    stdlib/zfuncs.go on lines 624..642

    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 258.

    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 4 locations. Consider refactoring.
    Invalid

    func FuncPssROEx(fn func(string, string) ugo.Object) ugo.CallableExFunc {
        return func(args ugo.Call) (ret ugo.Object, err error) {
            if err := args.CheckLen(2); err != nil {
                return ugo.Undefined, err
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 3 other locations - About 3 hrs to fix
    stdlib/zfuncs.go on lines 101..119
    stdlib/zfuncs.go on lines 136..154
    stdlib/zfuncs.go on lines 287..305

    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 254.

    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 4 locations. Consider refactoring.
    Invalid

    func FuncPsrROEx(fn func(string, rune) ugo.Object) ugo.CallableExFunc {
        return func(args ugo.Call) (ret ugo.Object, err error) {
            if err := args.CheckLen(2); err != nil {
                return ugo.Undefined, err
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 3 other locations - About 3 hrs to fix
    stdlib/zfuncs.go on lines 101..119
    stdlib/zfuncs.go on lines 136..154
    stdlib/zfuncs.go on lines 247..265

    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 254.

    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 4 locations. Consider refactoring.
    Invalid

    func FuncPsiROEx(fn func(string, int) ugo.Object) ugo.CallableExFunc {
        return func(args ugo.Call) (ret ugo.Object, err error) {
            if err := args.CheckLen(2); err != nil {
                return ugo.Undefined, err
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 3 other locations - About 3 hrs to fix
    stdlib/zfuncs.go on lines 136..154
    stdlib/zfuncs.go on lines 247..265
    stdlib/zfuncs.go on lines 287..305

    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 254.

    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 4 locations. Consider refactoring.
    Invalid

    func FuncPi64i64ROEx(fn func(int64, int64) ugo.Object) ugo.CallableExFunc {
        return func(args ugo.Call) (ret ugo.Object, err error) {
            if err := args.CheckLen(2); err != nil {
                return ugo.Undefined, err
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 3 other locations - About 3 hrs to fix
    stdlib/zfuncs.go on lines 101..119
    stdlib/zfuncs.go on lines 247..265
    stdlib/zfuncs.go on lines 287..305

    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 254.

    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 3 locations. Consider refactoring.
    Wontfix

    func FuncPiRO(fn func(int) ugo.Object) ugo.CallableFunc {
        return func(args ...ugo.Object) (ret ugo.Object, err error) {
            if len(args) != 1 {
                return ugo.Undefined, ugo.ErrWrongNumArguments.NewError("want=1 got=" + strconv.Itoa(len(args)))
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 2 other locations - About 2 hrs to fix
    stdlib/zfuncs.go on lines 383..397
    stdlib/zfuncs.go on lines 606..620

    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 3 locations. Consider refactoring.
    Wontfix

    func FuncPi64RO(fn func(int64) ugo.Object) ugo.CallableFunc {
        return func(args ...ugo.Object) (ret ugo.Object, err error) {
            if len(args) != 1 {
                return ugo.Undefined, ugo.ErrWrongNumArguments.NewError("want=1 got=" + strconv.Itoa(len(args)))
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 2 other locations - About 2 hrs to fix
    stdlib/zfuncs.go on lines 365..379
    stdlib/zfuncs.go on lines 606..620

    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 3 locations. Consider refactoring.
    Wontfix

    func FuncPsRO(fn func(string) ugo.Object) ugo.CallableFunc {
        return func(args ...ugo.Object) (ret ugo.Object, err error) {
            if len(args) != 1 {
                return ugo.Undefined, ugo.ErrWrongNumArguments.NewError("want=1 got=" + strconv.Itoa(len(args)))
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 2 other locations - About 2 hrs to fix
    stdlib/zfuncs.go on lines 365..379
    stdlib/zfuncs.go on lines 383..397

    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 3 locations. Consider refactoring.
    Invalid

    func FuncPi64ROEx(fn func(int64) ugo.Object) ugo.CallableExFunc {
        return func(args ugo.Call) (ret ugo.Object, err error) {
            if err := args.CheckLen(1); err != nil {
                return ugo.Undefined, err
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 2 other locations - About 2 hrs to fix
    stdlib/zfuncs.go on lines 28..42
    stdlib/zfuncs.go on lines 269..283

    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 188.

    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 3 locations. Consider refactoring.
    Invalid

    func FuncPiROEx(fn func(int) ugo.Object) ugo.CallableExFunc {
        return func(args ugo.Call) (ret ugo.Object, err error) {
            if err := args.CheckLen(1); err != nil {
                return ugo.Undefined, err
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 2 other locations - About 2 hrs to fix
    stdlib/zfuncs.go on lines 46..60
    stdlib/zfuncs.go on lines 269..283

    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 188.

    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 3 locations. Consider refactoring.
    Invalid

    func FuncPsROEx(fn func(string) ugo.Object) ugo.CallableExFunc {
        return func(args ugo.Call) (ret ugo.Object, err error) {
            if err := args.CheckLen(1); err != nil {
                return ugo.Undefined, err
            }
    Severity: Major
    Found in stdlib/zfuncs.go and 2 other locations - About 2 hrs to fix
    stdlib/zfuncs.go on lines 28..42
    stdlib/zfuncs.go on lines 46..60

    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 188.

    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

    There are no issues that match your filters.

    Category
    Status