Semantic-Org/Semantic-UI

View on GitHub

Showing 246 of 804 total issues

Avoid deeply nested control flow statements.
Open

                    if(module.is.searchSelection()) {
                      module.remove.searchTerm();
                    }
Severity: Major
Found in src/definitions/modules/dropdown.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(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(!event.shiftKey) {
                              module.verbose('Selecting next label');
                              $label.removeClass(className.active);
                            }
                            else {
        Severity: Major
        Found in src/definitions/modules/dropdown.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                            if(hasActiveLabel) {
                              module.verbose('Removing active labels');
                              if(isLastLabel) {
                                if(isSearch && !isFocusedOnSearch) {
                                  module.focusSearch();
          Severity: Major
          Found in src/definitions/modules/dropdown.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                          else if(module.is.bottom() ) {
            
                            // top edge
                            if( (scroll.bottom - element.height) <= element.top) {
                              module.debug('Bottom fixed rail has reached top of container');
            Severity: Major
            Found in src/definitions/modules/sticky.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                            if( scroll.top <= element.top ) {
                              module.debug('Jumped from bottom fixed to top fixed, most likely used home/end button');
                              module.setInitialPosition();
                            }
                            else {
              Severity: Major
              Found in src/definitions/modules/sticky.js - About 45 mins to fix

                Function getPath has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                  getPath: function(file, directory) {
                    var
                      configPath,
                      walk = function(directory) {
                        var
                Severity: Minor
                Found in tasks/config/project/config.js - About 45 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( scroll.top <= element.top ) {
                                  module.debug('Fixed element reached top of container');
                                  module.setInitialPosition();
                                }
                                else if( (element.height + scroll.top - elementScroll) >= context.bottom ) {
                Severity: Major
                Found in src/definitions/modules/sticky.js - About 45 mins to fix

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

                    easeOutQuad: function (x, t, b, c, d) {
                  Severity: Minor
                  Found in src/definitions/modules/nag.js - About 35 mins to fix

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

                      function sendMsg(height,width,triggerEvent,msg,targetOrigin) {
                    Severity: Minor
                    Found in examples/assets/library/iframe-content.js - About 35 mins to fix

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

                        function trigger(calleeMsg, msg, iframe, id, noResponseWarning) {
                      Severity: Minor
                      Found in examples/assets/library/iframe.js - About 35 mins to fix

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

                          easeOutQuad: function (x, t, b, c, d) {
                        Severity: Minor
                        Found in src/definitions/modules/accordion.js - About 35 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                        return $.extend({}, $.fn.transition.settings, {
                                          animation  : animation,
                                          onComplete : duration
                                        });
                          Severity: Major
                          Found in src/definitions/modules/transition.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                          return settings.on;
                            Severity: Major
                            Found in src/definitions/behaviors/api.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                                  return true;
                              Severity: Major
                              Found in src/definitions/modules/dropdown.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return;
                                Severity: Major
                                Found in src/definitions/behaviors/api.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                                return $.extend({}, $.fn.transition.settings, {
                                                  animation : animation
                                                });
                                  Severity: Major
                                  Found in src/definitions/modules/transition.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                return true;
                                    Severity: Major
                                    Found in src/definitions/modules/popup.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                          return true;
                                      Severity: Major
                                      Found in src/definitions/modules/dropdown.js - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language