amancevice/dip

View on GitHub

Showing 10 of 20 total issues

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

        if diff and app.git.get('sleep'):
            warnsleep(app)
        elif diff:
            warnask(app)
Severity: Minor
Found in dip/main.py and 1 other location - About 50 mins to fix
dip/main.py on lines 284..287

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

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

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

        if diff and app.git.get('sleep'):
            warnsleep(app)
        elif diff:
            warnask(app)
Severity: Minor
Found in dip/main.py and 1 other location - About 50 mins to fix
dip/main.py on lines 234..237

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

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

class NotInstalledError(DipError):
    """ CLI not installed. """
    def __init__(self, name):
        super(NotInstalledError, self).__init__(
            "'{name}' command is not installed".format(name=name))
Severity: Major
Found in dip/errors.py and 7 other locations - About 50 mins to fix
dip/errors.py on lines 10..14
dip/errors.py on lines 24..28
dip/errors.py on lines 31..35
dip/errors.py on lines 38..42
dip/errors.py on lines 45..49
dip/errors.py on lines 52..56
dip/errors.py on lines 59..63

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

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

class NoSuchPathError(DipError):
    """ Invalid git repository directory. """
    def __init__(self, path):
        super(NoSuchPathError, self).__init__(
            "Path does not exist '{path}'".format(path=path))
Severity: Major
Found in dip/errors.py and 7 other locations - About 50 mins to fix
dip/errors.py on lines 10..14
dip/errors.py on lines 17..21
dip/errors.py on lines 24..28
dip/errors.py on lines 38..42
dip/errors.py on lines 45..49
dip/errors.py on lines 52..56
dip/errors.py on lines 59..63

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

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

class GitFetchError(DipError):
    """ Error fetching remote. """
    def __init__(self, remote):
        super(GitFetchError, self).__init__(
            "Error fetching remote '{remote}'".format(remote=remote))
Severity: Major
Found in dip/errors.py and 7 other locations - About 50 mins to fix
dip/errors.py on lines 10..14
dip/errors.py on lines 17..21
dip/errors.py on lines 24..28
dip/errors.py on lines 31..35
dip/errors.py on lines 45..49
dip/errors.py on lines 52..56
dip/errors.py on lines 59..63

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

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

class InvalidGitRepositoryError(DipError):
    """ Invalid git repository directory. """
    def __init__(self, path):
        super(InvalidGitRepositoryError, self).__init__(
            "No git repository found in '{path}'".format(path=path))
Severity: Major
Found in dip/errors.py and 7 other locations - About 50 mins to fix
dip/errors.py on lines 10..14
dip/errors.py on lines 17..21
dip/errors.py on lines 24..28
dip/errors.py on lines 31..35
dip/errors.py on lines 38..42
dip/errors.py on lines 52..56
dip/errors.py on lines 59..63

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

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

class SettingsError(DipError):
    """ Error accessing dip config. """
    def __init__(self, path):
        super(SettingsError, self).__init__(
            "Unable to access dip settings at '{path}'".format(path=path))
Severity: Major
Found in dip/errors.py and 7 other locations - About 50 mins to fix
dip/errors.py on lines 17..21
dip/errors.py on lines 24..28
dip/errors.py on lines 31..35
dip/errors.py on lines 38..42
dip/errors.py on lines 45..49
dip/errors.py on lines 52..56
dip/errors.py on lines 59..63

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

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

class NoSuchService(DipError):
    """ No such docker-compose service defined. """
    def __init__(self, name):
        super(NoSuchService, self).__init__(
            "No service named '{name}' found in compose file"
Severity: Major
Found in dip/errors.py and 7 other locations - About 50 mins to fix
dip/errors.py on lines 10..14
dip/errors.py on lines 17..21
dip/errors.py on lines 24..28
dip/errors.py on lines 31..35
dip/errors.py on lines 38..42
dip/errors.py on lines 45..49
dip/errors.py on lines 52..56

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

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

class NoSuchRemoteError(DipError):
    """ Invalid git repository directory. """
    def __init__(self, name):
        super(NoSuchRemoteError, self).__init__(
            "Remote does not exist '{name}'".format(name=name))
Severity: Major
Found in dip/errors.py and 7 other locations - About 50 mins to fix
dip/errors.py on lines 10..14
dip/errors.py on lines 17..21
dip/errors.py on lines 31..35
dip/errors.py on lines 38..42
dip/errors.py on lines 45..49
dip/errors.py on lines 52..56
dip/errors.py on lines 59..63

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

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

class ComposeFileNotFound(DipError):
    """ No docker-compose file found. """
    def __init__(self, path):
        super(ComposeFileNotFound, self).__init__(
            "No compose file found in '{path}'".format(path=path))
Severity: Major
Found in dip/errors.py and 7 other locations - About 50 mins to fix
dip/errors.py on lines 10..14
dip/errors.py on lines 17..21
dip/errors.py on lines 24..28
dip/errors.py on lines 31..35
dip/errors.py on lines 38..42
dip/errors.py on lines 45..49
dip/errors.py on lines 59..63

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

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