alv-ch-ng/selectpicker

View on GitHub

Showing 12 of 12 total issues

Function exports has 304 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    module.exports = function (grunt) {
        require('load-grunt-tasks')(grunt, {
            pattern: ['grunt-*', '!grunt-template-jasmine-istanbul']
        });
        require('time-grunt')(grunt);
Severity: Major
Found in Gruntfile.js - About 1 day to fix

    Function link has 157 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                link: function(scope, element, attrs, ngModelCtrl) {
                    var id = attrs.id+'-list';
                    var noneSelected=attrs.title || 'common_i18n_select_noneSelectedText';
                    var noSelection='common_i18n_select_noSelectionText';
                    var required = 'required' in attrs || false;
    Severity: Major
    Found in src/js/selectpicker.js - About 6 hrs to fix

      File example.app.js has 324 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      ;(function () {
      
        'use strict';
      
        /**
      Severity: Minor
      Found in src/example/example.app.js - About 3 hrs to fix

        File Gruntfile.js has 309 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        ;(function () {
            'use strict';
        
            module.exports = function (grunt) {
                require('load-grunt-tasks')(grunt, {
        Severity: Minor
        Found in Gruntfile.js - About 3 hrs to fix

          Function buttonLabelProvider has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                          function buttonLabelProvider() {
                              var label = '';
                              var i, item;
                              if (scope.ngModel) {
                                  if (scope.valueAttribute) {
          Severity: Minor
          Found in src/js/selectpicker.js - About 1 hr to fix

            Avoid deeply nested control flow statements.
            Open

                                                if (label) {
                                                    label = label + ', ';
                                                }
            Severity: Major
            Found in src/js/selectpicker.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                                  if (label) {
                                                      label = label + ', ';
                                                  }
              Severity: Major
              Found in src/js/selectpicker.js - About 45 mins to fix

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

                      {group:"Herren", size:[
                          {value:'Herren / S'},
                          {value:'Herren / M'},
                          {value:'Herren / L'},
                          {value:'Herren / XL'},
                Severity: Minor
                Found in src/example/example.app.js and 1 other location - About 40 mins to fix
                src/example/example.app.js on lines 98..104

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

                      {group:"Kinder", size:[
                          {value:'Kinder / XS'},
                          {value:'Kinder / S'},
                          {value:'Kinder / M'},
                          {value:'Kinder / L'},
                Severity: Minor
                Found in src/example/example.app.js and 1 other location - About 40 mins to fix
                src/example/example.app.js on lines 91..97

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

                                example: {
                                    options: {
                                        paths: ['src/less'],
                                        compress: false,
                                        cleancss: true,
                Severity: Minor
                Found in Gruntfile.js and 1 other location - About 35 mins to fix
                Gruntfile.js on lines 59..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 47.

                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

                                prod: {
                                    options: {
                                        paths: ['src/less'],
                                        compress: false,
                                        cleancss: true,
                Severity: Minor
                Found in Gruntfile.js and 1 other location - About 35 mins to fix
                Gruntfile.js on lines 70..80

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

                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

                Avoid too many return statements within this function.
                Open

                                    return null;
                Severity: Major
                Found in src/js/selectpicker.js - About 30 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language