Semantic-Org/Semantic-UI

View on GitHub

Showing 246 of 804 total issues

Function display has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

          display: function() {
            var
              title = settings.name + ':',
              totalTime = 0
            ;
Severity: Minor
Found in src/definitions/modules/sidebar.js - About 1 hr to fix

    Function display has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

              display: function() {
                var
                  title = settings.name + ':',
                  totalTime = 0
                ;
    Severity: Minor
    Found in src/definitions/modules/dropdown.js - About 1 hr to fix

      Function labels has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                labels: function($labels) {
                  $labels = $labels || $module.find(selector.label);
                  module.verbose('Removing labels', $labels);
                  $labels
                    .each(function(){
      Severity: Minor
      Found in src/definitions/modules/dropdown.js - About 1 hr to fix

        Function display has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                  display: function() {
                    var
                      title = settings.name + ':',
                      totalTime = 0
                    ;
        Severity: Minor
        Found in src/definitions/modules/modal.js - About 1 hr to fix

          Function display has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                    display: function() {
                      var
                        title = settings.name + ':',
                        totalTime = 0
                      ;
          Severity: Minor
          Found in src/definitions/modules/nag.js - About 1 hr to fix

            Function display has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                      display: function() {
                        var
                          title = settings.name + ':',
                          totalTime = 0
                        ;
            Severity: Minor
            Found in src/definitions/behaviors/visibility.js - About 1 hr to fix

              Function api has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                        api: function(searchTerm, callback) {
                          var
                            apiSettings = {
                              debug             : settings.debug,
                              on                : false,
              Severity: Minor
              Found in src/definitions/modules/search.js - About 1 hr to fix

                Function behind has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                          behind: function() {
                            var
                              height = {
                                active : $activeSide.outerWidth(true),
                                next   : $nextSide.outerWidth(true)
                Severity: Minor
                Found in src/definitions/modules/shape.js - About 1 hr to fix

                  Function display has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                            display: function() {
                              var
                                title = settings.name + ':',
                                totalTime = 0
                              ;
                  Severity: Minor
                  Found in src/definitions/modules/checkbox.js - About 1 hr to fix

                    Function containerSize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                              containerSize: function() {
                                var
                                  tagName = $container.get(0).tagName
                                ;
                                if(tagName === 'HTML' || tagName == 'body') {
                    Severity: Minor
                    Found in src/definitions/modules/sticky.js - About 1 hr to fix

                      Function display has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                display: function() {
                                  var
                                    title = settings.name + ':',
                                    totalTime = 0
                                  ;
                      Severity: Minor
                      Found in src/definitions/modules/sticky.js - About 1 hr to fix

                        Function display has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                  display: function() {
                                    var
                                      title = settings.name + ':',
                                      totalTime = 0
                                    ;
                        Severity: Minor
                        Found in src/definitions/modules/progress.js - About 1 hr to fix

                          Function errorHandler has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  errorHandler: function(error) {
                                    var
                                      regExp = {
                                        variable : /@(\S.*?)\s/,
                                        theme    : /themes[\/\\]+(.*?)[\/\\].*/,
                          Severity: Minor
                          Found in tasks/config/tasks.js - About 1 hr to fix

                            Function display has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                      display: function() {
                                        var
                                          title = settings.name + ':',
                                          totalTime = 0
                                        ;
                            Severity: Minor
                            Found in src/definitions/modules/accordion.js - About 1 hr to fix

                              Function createJSON has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                createJSON: function(answers) {
                                  var
                                    json = {
                                      paths: {
                                        source: {},
                              Severity: Minor
                              Found in tasks/config/project/install.js - About 55 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

                              Function errorHandler has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                      errorHandler: function(error) {
                                        var
                                          regExp = {
                                            variable : /@(\S.*?)\s/,
                                            theme    : /themes[\/\\]+(.*?)[\/\\].*/,
                              Severity: Minor
                              Found in tasks/config/tasks.js - About 55 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

                              Avoid deeply nested control flow statements.
                              Open

                                                  if(isSubMenuItem) {
                                                    module.verbose('Left key pressed, closing sub-menu');
                                                    module.animate.hide(false, $parentMenu);
                                                    $selectedItem
                                                      .removeClass(className.selected)
                              Severity: Major
                              Found in src/definitions/modules/dropdown.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    if(isChecked) {
                                                      values[name] = value || true;
                                                    }
                                                    else {
                                                      values[name] = false;
                                Severity: Major
                                Found in src/definitions/behaviors/form.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if(settings.selectOnKeydown && module.is.single()) {
                                                        module.set.selectedItem($nextItem);
                                                      }
                                  Severity: Major
                                  Found in src/definitions/modules/dropdown.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                        if(isLastLabel) {
                                                          if(isSearch) {
                                                            if(!isFocusedOnSearch) {
                                                              module.focusSearch();
                                                            }
                                    Severity: Major
                                    Found in src/definitions/modules/dropdown.js - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language