jkawamoto/roadie

View on GitHub
assets/assets.go

Summary

Maintainability
B
4 hrs
Test Coverage

Function RestoreAsset has 6 return statements (exceeds 4 allowed).
Open

func RestoreAsset(dir, name string) error {
    data, err := Asset(name)
    if err != nil {
        return err
    }
Severity: Major
Found in assets/assets.go - About 40 mins to fix

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

    func assetsRoadieService() (*asset, error) {
        bytes, err := assetsRoadieServiceBytes()
        if err != nil {
            return nil, err
        }
    Severity: Major
    Found in assets/assets.go and 4 other locations - About 40 mins to fix
    assets/assets.go on lines 84..93
    assets/assets.go on lines 104..113
    assets/assets.go on lines 124..133
    assets/assets.go on lines 144..153

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

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

    func assetsQueueService() (*asset, error) {
        bytes, err := assetsQueueServiceBytes()
        if err != nil {
            return nil, err
        }
    Severity: Major
    Found in assets/assets.go and 4 other locations - About 40 mins to fix
    assets/assets.go on lines 84..93
    assets/assets.go on lines 104..113
    assets/assets.go on lines 124..133
    assets/assets.go on lines 164..173

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

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

    func assetsLogcastService() (*asset, error) {
        bytes, err := assetsLogcastServiceBytes()
        if err != nil {
            return nil, err
        }
    Severity: Major
    Found in assets/assets.go and 4 other locations - About 40 mins to fix
    assets/assets.go on lines 84..93
    assets/assets.go on lines 104..113
    assets/assets.go on lines 144..153
    assets/assets.go on lines 164..173

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

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

    func assetsAzure_startupSh() (*asset, error) {
        bytes, err := assetsAzure_startupShBytes()
        if err != nil {
            return nil, err
        }
    Severity: Major
    Found in assets/assets.go and 4 other locations - About 40 mins to fix
    assets/assets.go on lines 104..113
    assets/assets.go on lines 124..133
    assets/assets.go on lines 144..153
    assets/assets.go on lines 164..173

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

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

    func assetsFluentdService() (*asset, error) {
        bytes, err := assetsFluentdServiceBytes()
        if err != nil {
            return nil, err
        }
    Severity: Major
    Found in assets/assets.go and 4 other locations - About 40 mins to fix
    assets/assets.go on lines 84..93
    assets/assets.go on lines 124..133
    assets/assets.go on lines 144..153
    assets/assets.go on lines 164..173

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

    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

    Your code does not pass gofmt in 4 places. Go fmt your code!
    Open

    // Code generated by go-bindata.
    Severity: Minor
    Found in assets/assets.go by gofmt

    don't use underscores in Go names; var _assetsAzure_startupSh should be _assetsAzureStartupSh
    Open

    var _assetsAzure_startupSh = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x5c\x8e\xc1\x6a\x02\x31\x10\x86\xef\x79\x8a\xa9\x05\x6f\x49\x10\xd4\x42\xd1\xf6\x50\x3c\xef\x61\x1f\x40\x66\x93\xb8\xa6\x64\x37\x31\x99\x34\xeb\x8a\xef\x5e\x6a\x5b\x51\x2f\x03\xff\xf0\xfd\xdf\xcc\xf3\x93\x6c\x6c\x2f\x1b\x4c\x7b\x86\x81\x78\x6b\x08\x72\xd0\x48\x06\xa6\x53\xf8\xdf\xd8\x3e\x11\x3a\x07\xfc\x08\xa5\x35\xc4\x7e\x06\xf0\x0a\xa2\x47\x6d\x8d\x20\x8c\xa2\x1d\x61\xb2\x27\x0a\xe9\x55\xca\x52\x8a\xd0\xd1\x87\xc6\x0f\x42\xf9\x4e\x26\xf9\x99\x5d\x22\x75\x58\xbc\x2c\xe7\x1e\x0f\x0b\xf9\x5b\xe4\x38\xe6\x68\xb6\xce\xf6\x79\xd8\x62\xa7\x97\xf3\x3f\xd5\xbb\x76\xeb\xd9\x84\x11\x46\xe0\xe3\xf0\xb5\x7b\x38\xc4\x79\xa2\x68\xc3\x7a\xc6\x98\x42\x82\xd5\x6a\x53\xd5\xf0\x06\xca\xf7\x3b\xdb\x8a\x63\xe7\xd8\xe9\x04\xe2\xe3\x12\xe1\x7c\x66\x9b\xaa\xbe\x27\x93\x8a\x36\xd0\x95\xac\x2f\xf1\x4a\x8a\xbb\xf7\x6e\xb4\xb7\xbd\xef\x00\x00\x00\xff\xff\x68\x5c\xa5\x82\x39\x01\x00\x00")
    Severity: Minor
    Found in assets/assets.go by golint

    don't use underscores in Go names; func assetsAzure_startupSh should be assetsAzureStartupSh
    Open

    func assetsAzure_startupSh() (*asset, error) {
    Severity: Minor
    Found in assets/assets.go by golint

    don't use underscores in Go names; func assetsAzure_startupShBytes should be assetsAzureStartupShBytes
    Open

    func assetsAzure_startupShBytes() ([]byte, error) {
    Severity: Minor
    Found in assets/assets.go by golint

    There are no issues that match your filters.

    Category
    Status