concord-consortium/rigse

View on GitHub

Showing 1,194 of 2,135 total issues

Avoid too many return statements within this function.
Open

    return 0;
Severity: Major
Found in rails/react-components/src/library/helpers/sort-resources.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return (
          <>
            { offerings.map((offering: any) => <Offering key={offering.id} offering={offering} />) }
          </>
        );

      Avoid too many return statements within this function.
      Open

                  if (this.active) { return "   "; } else { return ""; }
      Severity: Major
      Found in rails/react-components/src/library/components/search/pagination.tsx - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return '<span class="disabled">|&lt;</span>';
        Severity: Major
        Found in rails/react-components/src/library/components/search/pagination.tsx - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return '<span class="disabled">Next →</span>';
          Severity: Major
          Found in rails/react-components/src/library/components/search/pagination.tsx - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return '<span class="disabled">← Previous</span>';
            Severity: Major
            Found in rails/react-components/src/library/components/search/pagination.tsx - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                            return "<a href='#' class='first'>|&lt;</a>";
              Severity: Major
              Found in rails/react-components/src/library/components/search/pagination.tsx - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            if (this.active) { return "..."; } else { return ""; }
                Severity: Major
                Found in rails/react-components/src/library/components/search/pagination.tsx - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              if (this.active) { return "   "; } else { return ""; }
                  Severity: Major
                  Found in rails/react-components/src/library/components/search/pagination.tsx - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return '<span class="disabled">&gt;|</span>';
                    Severity: Major
                    Found in rails/react-components/src/library/components/search/pagination.tsx - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  if (this.active) { return "..."; } else { return ""; }
                      Severity: Major
                      Found in rails/react-components/src/library/components/search/pagination.tsx - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                      return "<a href='#' class='prev'>← Previous</a>";
                        Severity: Major
                        Found in rails/react-components/src/library/components/search/pagination.tsx - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                        return "<a href='#' class='last'>&gt;|</a>";
                          Severity: Major
                          Found in rails/react-components/src/library/components/search/pagination.tsx - About 30 mins to fix

                            Function strftime has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                              strftime: function(grammar) {
                                var parts = { }, i18n = Date.default_i18n;
                                var lambda = function(date, part) {
                                  switch (part) {
                                  // date
                            Severity: Minor
                            Found in rails/public/javascripts/light_box.js - About 25 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 strftime has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                              strftime: function(grammar) {
                                var parts = { }, i18n = Date.default_i18n;
                                var lambda = function(date, part) {
                                  switch (part) {
                                  // date
                            Severity: Minor
                            Found in rails/public/javascripts/light_box.js - About 25 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 position has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                              position: function(e) {
                                var x = Event.pointer(e).x,
                                    y = Event.pointer(e).y,
                                    vpDim = document.viewport.getDimensions(),
                                    vpOff = document.viewport.getScrollOffset(),
                            Severity: Minor
                            Found in rails/public/javascripts/light_box.js - About 25 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 initialize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                              initialize: function(request){
                                this.request = request;
                                var transport  = this.transport  = request.transport,
                                  readyState = this.readyState = transport.readyState;
                            
                            
                            Severity: Minor
                            Found in rails/app/assets/javascripts/prototype.js - About 25 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 getInputs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                              getInputs: function(form, typeName, name) {
                                form = $(form);
                                var inputs = form.getElementsByTagName('input');
                            
                                if (!typeName && !name) return $A(inputs).map(Element.extend);
                            Severity: Minor
                            Found in rails/app/assets/javascripts/prototype.js - About 25 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 ObjectRange has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            var ObjectRange = Class.create(Enumerable, (function() {
                              function initialize(start, end, exclusive) {
                                this.start = start;
                                this.end = end;
                                this.exclusive = exclusive;
                            Severity: Minor
                            Found in rails/app/assets/javascripts/prototype.js - About 25 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 getEventPosition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                                getEventPosition: function (event){
                                    var offset = this.overlay.cumulativeOffset(),
                                        rx = (event.pageX - offset.left - this.plotOffset.left),
                                        ry = (event.pageY - offset.top - this.plotOffset.top),
                                        ax = 0, ay = 0;
                            Severity: Minor
                            Found in rails/app/assets/javascripts/flotr/flotr_out.js - About 25 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

                            Severity
                            Category
                            Status
                            Source
                            Language