bronycub/sugarcub

View on GitHub

Showing 3,238 of 3,238 total issues

Function ordinal has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    ordinal : function (number) {
        var b = number % 10,
            output = (~~(number % 100 / 10) === 1) ? 'e' :
            (b === 1) ? 'a' :
            (b === 2) ? 'a' :
Severity: Minor
Found in core/static/vendor/moment/src/locale/sv.js - About 1 hr 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 ordinal has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    ordinal : function (number) {
        var b = number % 10,
            output = (~~(number % 100 / 10) === 1) ? 'th' :
            (b === 1) ? 'st' :
            (b === 2) ? 'nd' :
Severity: Minor
Found in core/static/vendor/moment/src/locale/en-ca.js - About 1 hr 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 ordinal has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    ordinal : function (number) {
        var b = number % 10,
            output = (~~(number % 100 / 10) === 1) ? 'th' :
            (b === 1) ? 'st' :
            (b === 2) ? 'nd' :
Severity: Minor
Found in core/static/vendor/moment/src/locale/x-pseudo.js - About 1 hr 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 ordinal has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    ordinal : function (number) {
        var b = number % 10,
            output = (~~(number % 100 / 10) === 1) ? 'th' :
            (b === 1) ? 'st' :
            (b === 2) ? 'nd' :
Severity: Minor
Found in core/static/vendor/moment/src/locale/en-au.js - About 1 hr 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 updateLocale has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

export function updateLocale(name, config) {
    if (config != null) {
        var locale, parentConfig = baseConfig;
        // MERGE
        if (locales[name] != null) {
Severity: Minor
Found in core/static/vendor/moment/src/lib/locale/locales.js - About 1 hr 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 ordinal has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    ordinal : function (number) {
        var b = number % 10,
            output = (~~(number % 100 / 10) === 1) ? 'th' :
            (b === 1) ? 'st' :
            (b === 2) ? 'nd' :
Severity: Minor
Found in core/static/vendor/moment/src/locale/tet.js - About 1 hr 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 ordinal has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    ordinal : function (number) {
        var b = number % 10,
            output = (toInt(number % 100 / 10) === 1) ? 'th' :
            (b === 1) ? 'st' :
            (b === 2) ? 'nd' :
Severity: Minor
Found in core/static/vendor/moment/src/lib/locale/en.js - About 1 hr 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 meridiemHour has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    meridiemHour : function (hour, meridiem) {
        if (hour === 12) {
            hour = 0;
        }
        if (meridiem === 'யாமம்') {
Severity: Minor
Found in core/static/vendor/moment/src/locale/ta.js - About 1 hr 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 configFromStringAndArray has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

export function configFromStringAndArray(config) {
    var tempConfig,
        bestMoment,

        scoreToBeat,
Severity: Minor
Found in core/static/vendor/moment/src/lib/create/from-string-and-array.js - About 1 hr 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 listWeekdaysImpl has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function listWeekdaysImpl (localeSorted, format, index, field) {
    if (typeof localeSorted === 'boolean') {
        if (isNumber(format)) {
            index = format;
            format = undefined;
Severity: Minor
Found in core/static/vendor/moment/src/lib/locale/lists.js - About 1 hr 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 toISOString has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

export function toISOString() {
    // for ISO strings we do not use the normal bubbling rules:
    //  * milliseconds bubble up until they become hours
    //  * days do not bubble at all
    //  * months bubble up until they become years
Severity: Minor
Found in core/static/vendor/moment/src/lib/duration/iso-string.js - About 1 hr 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 translate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function translate(number, withoutSuffix, key, isFuture) {
    var num = number,
        suffix;
    switch (key) {
        case 's':
Severity: Minor
Found in core/static/vendor/moment/locale/hu.js - About 1 hr to fix

    Function translate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function translate(number, withoutSuffix, key, isFuture) {
        var num = number,
            suffix;
        switch (key) {
            case 's':
    Severity: Minor
    Found in core/static/vendor/moment/src/locale/hu.js - About 1 hr to fix

      Function listWeekdaysImpl has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function listWeekdaysImpl (localeSorted, format, index, field) {
          if (typeof localeSorted === 'boolean') {
              if (isNumber(format)) {
                  index = format;
                  format = undefined;
      Severity: Minor
      Found in core/static/vendor/moment/src/lib/locale/lists.js - About 1 hr to fix

        Function localeMonthsParse has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function localeMonthsParse (monthName, format, strict) {
            var i, mom, regex;
        
            if (this._monthsParseExact) {
                return handleStrictParse.call(this, monthName, format, strict);
        Severity: Minor
        Found in core/static/vendor/moment/src/lib/units/month.js - About 1 hr to fix

          Function localeMonthsParse has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function localeMonthsParse (monthName, format, strict) {
              var i, mom, regex;
          
              if (this._monthsParseExact) {
                  return handleStrictParse.call(this, monthName, format, strict);
          Severity: Minor
          Found in core/static/vendor/moment/min/moment-with-locales.js - About 1 hr to fix

            Function translate$4 has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function translate$4(number, withoutSuffix, key, isFuture) {
                var num = number,
                    suffix;
                switch (key) {
                    case 's':
            Severity: Minor
            Found in core/static/vendor/moment/min/moment-with-locales.js - About 1 hr to fix

              Function listWeekdaysImpl has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function listWeekdaysImpl (localeSorted, format, index, field) {
                  if (typeof localeSorted === 'boolean') {
                      if (isNumber(format)) {
                          index = format;
                          format = undefined;
              Severity: Minor
              Found in core/static/vendor/moment/min/moment-with-locales.js - About 1 hr to fix

                Function localeMonthsParse has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function localeMonthsParse (monthName, format, strict) {
                    var i, mom, regex;
                
                    if (this._monthsParseExact) {
                        return handleStrictParse.call(this, monthName, format, strict);
                Severity: Minor
                Found in core/static/vendor/moment/moment.js - About 1 hr to fix

                  Function listWeekdaysImpl has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function listWeekdaysImpl (localeSorted, format, index, field) {
                      if (typeof localeSorted === 'boolean') {
                          if (isNumber(format)) {
                              index = format;
                              format = undefined;
                  Severity: Minor
                  Found in core/static/vendor/moment/moment.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language