SimonBaeumer/goss

View on GitHub

Showing 157 of 157 total issues

File resource_list.go has 1234 lines of code (exceeds 500 allowed). Consider refactoring.
Open

// This file was automatically generated by genny.
// Any changes will be lost if this file is regenerated.
// see https://github.com/cheekybits/genny

package resource
Severity: Major
Found in resource/resource_list.go - About 2 days to fix

    Function createAddCommand has 134 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func createAddCommand(app *cli.App) cli.Command {
        return cli.Command{
            Name:    "add",
            Aliases: []string{"a"},
            Usage:   "add a resource to the test suite",
    Severity: Major
    Found in cmd/goss/goss.go - About 4 hrs to fix

      Function ValidateContains has 126 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func ValidateContains(res ResourceRead, property string, expectedValues []string, method func() (io.Reader, error), skip bool) TestResult {
          format.TruncatedDiff = false
          id := res.ID()
          title := res.GetTitle()
          meta := res.GetMeta()
      Severity: Major
      Found in resource/validate.go - About 4 hrs to fix

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

        func (ret *UserMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *InterfaceMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *HTTPMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *DNSMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *ResourceTypeMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list_genny.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *MountMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *GossfileMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *PortMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *KernelParamMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *GroupMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *MatchingMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/matching.go and 16 other locations - About 3 hrs to fix
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *CommandMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *AddrMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *FileMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *ProcessMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *PackageMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 953..988
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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 17 locations. Consider refactoring.
        Open

        func (ret *ServiceMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go and 16 other locations - About 3 hrs to fix
        resource/matching.go on lines 43..78
        resource/resource_list.go on lines 53..88
        resource/resource_list.go on lines 153..188
        resource/resource_list.go on lines 253..288
        resource/resource_list.go on lines 353..388
        resource/resource_list.go on lines 453..488
        resource/resource_list.go on lines 553..588
        resource/resource_list.go on lines 653..688
        resource/resource_list.go on lines 753..788
        resource/resource_list.go on lines 853..888
        resource/resource_list.go on lines 1053..1088
        resource/resource_list.go on lines 1153..1188
        resource/resource_list.go on lines 1253..1288
        resource/resource_list.go on lines 1353..1388
        resource/resource_list.go on lines 1467..1502
        resource/resource_list_genny.go on lines 53..88

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

        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