redu/autorregulacao

View on GitHub

Showing 52 of 52 total issues

Function styleInputFile has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    styleInputFile: function(options) {
      var settings = $.extend({
        buttonDefault: 'button-default'
      , buttonText: 'Escolher arquivo'
      , filePath: 'control-file-text'
Severity: Minor
Found in lib/assets/javascripts/bootstrap-redu.js - About 1 hr to fix

    Function countChars has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        countChars: function(options) {
          var settings = $.extend({
            characterCounterTemplate: $('<span class="character-counter legend"></span>')
          }, options);
    
    
    Severity: Minor
    Found in lib/assets/javascripts/bootstrap-redu.js - About 1 hr to fix

      Function render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function render(mode, el, holder, src) {
      
          var dimensions = holder.dimensions,
              theme = holder.theme,
              text = holder.text;
      Severity: Minor
      Found in lib/assets/javascripts/holder.js - About 1 hr to fix

        Function add_token has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function add_token (item) {
                var callback = settings.onAdd;
        
                // See if the token already exists and select it if we don't want duplicates
                if(token_count > 0 && settings.preventDuplicates) {
        Severity: Minor
        Found in lib/assets/javascripts/jquery.tokeninput.js - About 1 hr to fix

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

                  if (typeof thumbnail !== 'undefined') {
                      thumbnailTag = '<img class="' + DEFAULT_CLASSES.thumbnail + '" src="' + thumbnail + '" alt="' + name + '" title="' + name + '">'
                  }
          Severity: Major
          Found in lib/assets/javascripts/jquery.tokeninput.js and 1 other location - About 1 hr to fix
          lib/assets/javascripts/jquery.tokeninput.js on lines 72..74

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

          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 (typeof thumbnail !== 'undefined') {
                      thumbnailTag = '<img class="' + DEFAULT_CLASSES.thumbnail + '" src="' + thumbnail + '" alt="' + name + '" title="' + name + '">'
                  }
          Severity: Major
          Found in lib/assets/javascripts/jquery.tokeninput.js and 1 other location - About 1 hr to fix
          lib/assets/javascripts/jquery.tokeninput.js on lines 86..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 56.

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

              search: function(options) {
                  var settings = $.extend({
                    iconMagnifierGray: 'icon-magnifier-gray_16_18'
                  , iconMagnifierLightBlue: 'icon-magnifier-lightblue_16_18'
                  , blue2: '#73C3E6'
          Severity: Minor
          Found in lib/assets/javascripts/bootstrap-redu.js - About 1 hr to fix

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

                  this.timeout = setTimeout(function() {
                    if (self.hoverState == 'in') self.show()
                  }, self.options.delay.show)
            Severity: Major
            Found in lib/assets/javascripts/bootstrap-redu.js and 1 other location - About 1 hr to fix
            lib/assets/javascripts/bootstrap-redu.js on lines 613..615

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

            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

                  this.timeout = setTimeout(function() {
                    if (self.hoverState == 'out') self.hide()
                  }, self.options.delay.hide)
            Severity: Major
            Found in lib/assets/javascripts/bootstrap-redu.js and 1 other location - About 1 hr to fix
            lib/assets/javascripts/bootstrap-redu.js on lines 601..603

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

            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

                fluid.style.height = holder.dimensions.height + (holder.dimensions.height.indexOf("%")>0?"":"px");
            Severity: Minor
            Found in lib/assets/javascripts/holder.js and 1 other location - About 55 mins to fix
            lib/assets/javascripts/holder.js on lines 116..116

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

            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

                fluid.style.width = holder.dimensions.width + (holder.dimensions.width.indexOf("%")>0?"":"px");
            Severity: Minor
            Found in lib/assets/javascripts/holder.js and 1 other location - About 55 mins to fix
            lib/assets/javascripts/holder.js on lines 117..117

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

            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 toggleDropdown has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                toggleDropdown: function(listMixItem, openClass, listMixHeaderLegend, listMixInfoClass, listMixBody) {
            Severity: Minor
            Found in lib/assets/javascripts/bootstrap-redu.js - About 35 mins to fix
              Severity
              Category
              Status
              Source
              Language