conveyal/modeify

View on GitHub

Showing 301 of 580 total issues

Avoid too many return statements within this function.
Open

  if ('object' == typeof key) return each(key, set);
Severity: Major
Found in client/components/yields/store/master/index.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

      return false;
    Severity: Major
    Found in client/components/visionmedia/superagent/v1.1.0/lib/client.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

        return '#333'
      Severity: Major
      Found in client/convert/index.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return {
                x: this.labelAnchor.x,
                y: this.labelAnchor.y - bboxSide,
                width: bboxSide,
                height: bboxSide

          Avoid too many return statements within this function.
          Open

                return {
                  x: this.labelAnchor.x - bboxSide,
                  y: this.labelAnchor.y - bboxSide,
                  width: bboxSide,
                  height: bboxSide

            Avoid too many return statements within this function.
            Open

                  return {
                    x: this.labelAnchor.x - bboxSide,
                    y: this.labelAnchor.y,
                    width: bboxSide,
                    height: bboxSide

              Avoid too many return statements within this function.
              Open

                    return {
                      x: this.labelAnchor.x,
                      y: this.labelAnchor.y,
                      width: bboxSide,
                      height: bboxSide

                Avoid too many return statements within this function.
                Open

                    if (link && link.indexOf('mailto:') > -1) return;
                Severity: Major
                Found in client/components/visionmedia/page.js/1.6.1/index.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      if (!hashbang && el.pathname === location.pathname && (el.hash || '#' === link)) return;
                  Severity: Major
                  Found in client/components/visionmedia/page.js/1.6.1/index.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                      return ms + 'ms';
                    Severity: Major
                    Found in client/components/rauchg/ms.js/0.7.0/index.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {}
                      Severity: Major
                      Found in client/components/visionmedia/superagent/v1.1.0/lib/client.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                            if (el.getAttribute('download') || el.getAttribute('rel') === 'external') return;
                        Severity: Major
                        Found in client/components/visionmedia/page.js/1.6.1/index.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              if (base && orig === path) return;
                          Severity: Major
                          Found in client/components/visionmedia/page.js/1.6.1/index.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                if (el.target) return;
                            Severity: Major
                            Found in client/components/visionmedia/page.js/1.6.1/index.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                  if (!sameOrigin(el.href)) return;
                              Severity: Major
                              Found in client/components/visionmedia/page.js/1.6.1/index.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                    return true
                                Severity: Major
                                Found in lib/plan/profile-filter.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                      return true
                                  Severity: Major
                                  Found in lib/plan/profile-filter.js - About 30 mins to fix

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

                                    function loadCommuter (next) {
                                      var commuterData = store('commuter')
                                      var user = session.user()
                                    
                                      if (session.commuter()) {
                                    Severity: Minor
                                    Found in client/session/index.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 loadOrg has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    Ridepool.loadOrg = function (ctx, next) {
                                      log.info('ridepool loadOrg')
                                      request
                                        .get('/ridepools/created_by/' + ctx.params.organization, function (err, res) {
                                          if (err) {
                                    Severity: Minor
                                    Found in client/ridepool/index.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 modesCSV has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    Plan.prototype.modesCSV = function () {
                                      var modes = []
                                      if (this.bike()) modes.push('BICYCLE')
                                      if (this.bikeShare()) modes.push('BICYCLE_RENT')
                                      if (this.bus()) modes.push('BUS')
                                    Severity: Minor
                                    Found in client/plan/index.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