creative-workflow/pi-setup

View on GitHub

Showing 116 of 116 total issues

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

    if(this.options.fadeOut.enabled)
      this.$note.delay(this.options.fadeOut.delay || 3000).fadeOut('slow', $.proxy(onClose, this));
    else onClose.call(this);
Severity: Minor
Found in services/pisound/src/web/htdocs/js/bootstrap-notify.js and 1 other location - About 45 mins to fix
services/pisound/src/web/htdocs/js/bootstrap-notify.js on lines 64..65

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

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

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

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

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

Refactorings

Further Reading

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

    _listen: function(name, callback) {
      return this.$element().bind([name, this.eventNamespace()].join('.'), callback);
    },
Severity: Minor
Found in services/pisound/src/web/htdocs/js/sammy.js and 1 other location - About 40 mins to fix
services/pisound/src/web/htdocs/js/sammy.js on lines 1476..1478

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

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

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

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

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

Refactorings

Further Reading

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

    _unlisten: function(name, callback) {
      return this.$element().unbind([name, this.eventNamespace()].join('.'), callback);
    }
Severity: Minor
Found in services/pisound/src/web/htdocs/js/sammy.js and 1 other location - About 40 mins to fix
services/pisound/src/web/htdocs/js/sammy.js on lines 1472..1474

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

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

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

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

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

Refactorings

Further Reading

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

    return $e.attr('data-content')
      || (typeof o.content == 'function' ?
            o.content.call($e[0]) :
            o.content)
Severity: Minor
Found in services/pisound/src/web/htdocs/js/bootstrap.js and 1 other location - About 40 mins to fix
services/pisound/src/web/htdocs/js/bootstrap.js on lines 1349..1350

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

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

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

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

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

Refactorings

Further Reading

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

    title = $e.attr('data-original-title')
      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
Severity: Minor
Found in services/pisound/src/web/htdocs/js/bootstrap.js and 1 other location - About 40 mins to fix
services/pisound/src/web/htdocs/js/bootstrap.js on lines 1489..1492

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

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

Consider simplifying this complex logical expression.
Open

      if (autoPlace) {
        var $parent = this.$element.parent()

        var orgPlacement = placement
        var docScroll    = document.documentElement.scrollTop || document.body.scrollTop
Severity: Major
Found in services/pisound/src/web/htdocs/js/bootstrap.js - About 40 mins to fix

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

      $.fn.affix.noConflict = function () {
        $.fn.affix = old
        return this
      }
    Severity: Major
    Found in services/pisound/src/web/htdocs/js/bootstrap.js and 8 other locations - About 40 mins to fix
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 134..137
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 237..240
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 427..430
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 602..605
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 763..766
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 994..997
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1671..1674
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1799..1802

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

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

      $.fn.dropdown.noConflict = function () {
        $.fn.dropdown = old
        return this
      }
    Severity: Major
    Found in services/pisound/src/web/htdocs/js/bootstrap.js and 8 other locations - About 40 mins to fix
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 134..137
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 237..240
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 427..430
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 602..605
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 994..997
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1671..1674
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1799..1802
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1928..1931

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

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

      $.fn.carousel.noConflict = function () {
        $.fn.carousel = old
        return this
      }
    Severity: Major
    Found in services/pisound/src/web/htdocs/js/bootstrap.js and 8 other locations - About 40 mins to fix
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 134..137
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 237..240
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 602..605
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 763..766
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 994..997
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1671..1674
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1799..1802
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1928..1931

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

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

      $.fn.tab.noConflict = function () {
        $.fn.tab = old
        return this
      }
    Severity: Major
    Found in services/pisound/src/web/htdocs/js/bootstrap.js and 8 other locations - About 40 mins to fix
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 134..137
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 237..240
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 427..430
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 602..605
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 763..766
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 994..997
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1671..1674
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1928..1931

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

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

      $.fn.alert.noConflict = function () {
        $.fn.alert = old
        return this
      }
    Severity: Major
    Found in services/pisound/src/web/htdocs/js/bootstrap.js and 8 other locations - About 40 mins to fix
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 237..240
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 427..430
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 602..605
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 763..766
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 994..997
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1671..1674
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1799..1802
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1928..1931

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

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

      $.fn.button.noConflict = function () {
        $.fn.button = old
        return this
      }
    Severity: Major
    Found in services/pisound/src/web/htdocs/js/bootstrap.js and 8 other locations - About 40 mins to fix
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 134..137
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 427..430
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 602..605
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 763..766
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 994..997
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1671..1674
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1799..1802
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1928..1931

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

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

      $.fn.collapse.noConflict = function () {
        $.fn.collapse = old
        return this
      }
    Severity: Major
    Found in services/pisound/src/web/htdocs/js/bootstrap.js and 8 other locations - About 40 mins to fix
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 134..137
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 237..240
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 427..430
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 763..766
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 994..997
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1671..1674
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1799..1802
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1928..1931

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

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

      $.fn.modal.noConflict = function () {
        $.fn.modal = old
        return this
      }
    Severity: Major
    Found in services/pisound/src/web/htdocs/js/bootstrap.js and 8 other locations - About 40 mins to fix
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 134..137
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 237..240
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 427..430
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 602..605
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 763..766
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1671..1674
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1799..1802
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1928..1931

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

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

      $.fn.scrollspy.noConflict = function () {
        $.fn.scrollspy = old
        return this
      }
    Severity: Major
    Found in services/pisound/src/web/htdocs/js/bootstrap.js and 8 other locations - About 40 mins to fix
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 134..137
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 237..240
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 427..430
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 602..605
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 763..766
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 994..997
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1799..1802
    services/pisound/src/web/htdocs/js/bootstrap.js on lines 1928..1931

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

    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

    Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      def __init__(self, service, local_script_path, script_name = None, remote_path=None, local_path=None):
    Severity: Minor
    Found in lib/piservices/initd.py - About 35 mins to fix

      Function EventContext has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        Sammy.EventContext = function(app, verb, path, params, target) {
      Severity: Minor
      Found in services/pisound/src/web/htdocs/js/sammy.js - About 35 mins to fix

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

        sys.path.append(os.path.realpath(os.path.dirname(__file__))+'/lib')
        Severity: Minor
        Found in test.py and 1 other location - About 35 mins to fix
        fabfile.py on lines 6..6

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

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

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

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

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

        Refactorings

        Further Reading

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

          def set(self, key, value=''):
            if not self.cfg: self.load()
            self.cfg.set(key, value)
            return self
        Severity: Minor
        Found in lib/piservices/remote/config.py and 1 other location - About 35 mins to fix
        lib/piservices/remote/config.py on lines 76..79

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

        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

        Function set has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

          def set(self, key, value='', pos=None):
            if not key in self.content:
              self.content+= ('\n'+key+' '+value)
            else:
              lines = self.content.splitlines()
        Severity: Minor
        Found in lib/piservices/remote/config.py - About 35 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Severity
        Category
        Status
        Source
        Language