creative-workflow/pi-setup

View on GitHub

Showing 116 of 116 total issues

Function show has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  Tooltip.prototype.show = function () {
    var e = $.Event('show.bs.' + this.type)

    if (this.hasContent() && this.enabled) {
      this.$element.trigger(e)
Severity: Minor
Found in services/pisound/src/web/htdocs/js/bootstrap.js - About 2 hrs to fix

    Function slide has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      Carousel.prototype.slide = function (type, next) {
        var $active   = this.$element.find('.item.active')
        var $next     = next || $active[type]()
        var isCycling = this.interval
        var direction = type == 'next' ? 'left' : 'right'
    Severity: Minor
    Found in services/pisound/src/web/htdocs/js/bootstrap.js - About 1 hr to fix

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

        $(window).on('load', function () {
          $('[data-ride="carousel"]').each(function () {
            var $carousel = $(this)
            $carousel.carousel($carousel.data())
          })
      Severity: Major
      Found in services/pisound/src/web/htdocs/js/bootstrap.js and 1 other location - About 1 hr to fix
      services/pisound/src/web/htdocs/js/bootstrap.js on lines 1680..1685

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

      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

        $(window).on('load', function () {
          $('[data-spy="scroll"]').each(function () {
            var $spy = $(this)
            $spy.scrollspy($spy.data())
          })
      Severity: Major
      Found in services/pisound/src/web/htdocs/js/bootstrap.js and 1 other location - About 1 hr to fix
      services/pisound/src/web/htdocs/js/bootstrap.js on lines 452..457

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

      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 contextMatchesOptions has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          contextMatchesOptions: function(context, match_options, positive) {
            var options = match_options;
            // normalize options
            if (typeof options === 'string' || _isRegExp(options)) {
              options = {path: options};
      Severity: Minor
      Found in services/pisound/src/web/htdocs/js/sammy.js - About 1 hr to fix

        Function applyPlacement has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          Tooltip.prototype.applyPlacement = function (offset, placement) {
            var replace
            var $tip   = this.tip()
            var width  = $tip[0].offsetWidth
            var height = $tip[0].offsetHeight
        Severity: Minor
        Found in services/pisound/src/web/htdocs/js/bootstrap.js - About 1 hr to fix

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

                $.support.transition && this.$tip.hasClass('fade') ?
                  $tip
                    .one($.support.transition.end, complete)
                    .emulateTransitionEnd(150) :
                  complete()
          Severity: Major
          Found in services/pisound/src/web/htdocs/js/bootstrap.js and 1 other location - About 1 hr to fix
          services/pisound/src/web/htdocs/js/bootstrap.js on lines 1307..1311

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

          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

              $.support.transition && this.$tip.hasClass('fade') ?
                $tip
                  .one($.support.transition.end, complete)
                  .emulateTransitionEnd(150) :
                complete()
          Severity: Major
          Found in services/pisound/src/web/htdocs/js/bootstrap.js and 1 other location - About 1 hr to fix
          services/pisound/src/web/htdocs/js/bootstrap.js on lines 1211..1215

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

          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 bind has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              bind: function() {
                var proxy = this, app = this.app, lp = Sammy.DefaultLocationProxy;
                $(window).bind('hashchange.' + this.app.eventNamespace(), function(e, non_native) {
                  // if we receive a native hash change event, set the proxy accordingly
                  // and stop polling
          Severity: Minor
          Found in services/pisound/src/web/htdocs/js/sammy.js - About 1 hr to fix

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

                  $.each(this.listeners.toHash() , function(name, listeners) {
                    $.each(listeners, function(i, listener_callback) {
                      app._unlisten(name, listener_callback);
                    });
                  });
            Severity: Major
            Found in services/pisound/src/web/htdocs/js/sammy.js and 1 other location - About 1 hr to fix
            services/pisound/src/web/htdocs/js/sammy.js on lines 973..977

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

            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

                  $.each(this.listeners.toHash(), function(name, callbacks) {
                    $.each(callbacks, function(i, listener_callback) {
                      app._listen(name, listener_callback);
                    });
                  });
            Severity: Major
            Found in services/pisound/src/web/htdocs/js/sammy.js and 1 other location - About 1 hr to fix
            services/pisound/src/web/htdocs/js/sammy.js on lines 1021..1025

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

            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 renderEach has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                renderEach: function(location, name, data, callback) {
                  if (_isArray(name)) {
                    callback = data;
                    data = name;
                    name = null;
            Severity: Minor
            Found in services/pisound/src/web/htdocs/js/sammy.js - About 1 hr to fix

              Function show has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                Modal.prototype.show = function (_relatedTarget) {
                  var that = this
                  var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
              
                  this.$element.trigger(e)
              Severity: Minor
              Found in services/pisound/src/web/htdocs/js/bootstrap.js - About 1 hr to fix

                Function show has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  Collapse.prototype.show = function () {
                    if (this.transitioning || this.$element.hasClass('in')) return
                
                    var startEvent = $.Event('show.bs.collapse')
                    this.$element.trigger(startEvent)
                Severity: Minor
                Found in services/pisound/src/web/htdocs/js/bootstrap.js - About 1 hr to fix

                  Function route has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      route: function(verb, path) {
                        var app = this, param_names = [], add_route, path_match, callback = Array.prototype.slice.call(arguments,2);
                  
                        // if the method signature is just (path, callback)
                        // assume the verb is 'any'
                  Severity: Minor
                  Found in services/pisound/src/web/htdocs/js/sammy.js - About 1 hr to fix

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

                      def config_parser(self, remote_file = None, *args, **kwargs):
                        if remote_file: remote_file = self.service.normalize_path(remote_file)
                        return RemoteConfigParser(self.service, remote_file, *args, **kwargs)
                    Severity: Major
                    Found in lib/piservices/remote/integration.py and 3 other locations - About 1 hr to fix
                    lib/piservices/remote/integration.py on lines 42..44
                    lib/piservices/remote/integration.py on lines 50..52
                    lib/piservices/remote/integration.py on lines 54..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 40.

                    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

                      def _interface(self):
                        if self.config.interface == 'auto':
                          return self.service('wlan').interface()
                    
                        return self.config.interface
                    Severity: Major
                    Found in services/hostapd/__init__.py and 1 other location - About 1 hr to fix
                    services/udhcpd/__init__.py on lines 65..69

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                      def config_shellvars(self, remote_file = None, *args, **kwargs):
                        if remote_file: remote_file = self.service.normalize_path(remote_file)
                        return RemoteShellVarsLoader(self.service, remote_file, *args, **kwargs)
                    Severity: Major
                    Found in lib/piservices/remote/integration.py and 3 other locations - About 1 hr to fix
                    lib/piservices/remote/integration.py on lines 42..44
                    lib/piservices/remote/integration.py on lines 46..48
                    lib/piservices/remote/integration.py on lines 54..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 40.

                    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

                      def _interface(self):
                        if self.config.interface == 'auto':
                          return self.service('wlan').interface()
                    
                        return self.config.interface
                    Severity: Major
                    Found in services/udhcpd/__init__.py and 1 other location - About 1 hr to fix
                    services/hostapd/__init__.py on lines 80..84

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                      def config_whitespace(self, remote_file = None, *args, **kwargs):
                        if remote_file: remote_file = self.service.normalize_path(remote_file)
                        return RemoteWhitespaceConfigLoader(self.service, remote_file, *args, **kwargs)
                    Severity: Major
                    Found in lib/piservices/remote/integration.py and 3 other locations - About 1 hr to fix
                    lib/piservices/remote/integration.py on lines 42..44
                    lib/piservices/remote/integration.py on lines 46..48
                    lib/piservices/remote/integration.py on lines 50..52

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

                    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