Showing 2,859 of 2,859 total issues

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

function ModifyPointsSet() {
  if (livePoints.count < kNPoints) {
    for (var i = 0; i < kNModifications; i++) {
      CreateNewPoint();
    }
Severity: Minor
Found in deps/v8/benchmarks/spinning-balls/v.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

Function streamWrite has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

function streamWrite(algo, message, encoding, writes, len, outEnc) {
Severity: Minor
Found in benchmark/crypto/hash-stream-creation.js - About 45 mins to fix

    Function am4 has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function am4(i,x,w,j,c,n) {
    Severity: Minor
    Found in deps/v8/benchmarks/crypto.js - About 45 mins to fix

      Function legacyWrite has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function legacyWrite(algo, message, encoding, writes, len, outEnc) {
      Severity: Minor
      Found in benchmark/crypto/hash-stream-creation.js - About 45 mins to fix

        Function advect has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            function advect(b, d, d0, u, v, dt)
        Severity: Minor
        Found in deps/v8/benchmarks/navier-stokes.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                                                          while ((i>=(0))) {
                                                                              {
                                                                                  (pred_set = ((sc_state_83 = (sc_states_78[i])), (sc_state_83[(pred+(1))])));
                                                                                  if ((pred_set!== false))
                                                                                      {
          Severity: Major
          Found in deps/v8/benchmarks/earley-boyer.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                        if ((lst1 === null))
                                            return (lst2 === null);
                                        else
                                            if ((lst2 === null))
                                                return false;
            Severity: Major
            Found in deps/v8/benchmarks/earley-boyer.js - About 45 mins to fix

              Function DrawBarBase has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  function DrawBarBase(color, start, end, top, bottom, transparency) {
              Severity: Minor
              Found in deps/v8/tools/profviz/composer.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                                            if ((((conf_set = (sc_state_82[(ender+(1))])), ((conf_set!== false)?(conf_set[(BgL_sc_statezd2num_68zd2+(5))]):false))!== false))
                                                                                {
                                                                                    (next = (sc_conf_80+(1)));
                                                                                    (next_set = (BgL_sc_confzd2setzd2getza2_44za2(sc_state_82, BgL_sc_statezd2num_68zd2, next)));
                                                                                    (conf_set_union(sc_state_82, next_set, next, BgL_sc_confzd2set_79zd2));
                Severity: Major
                Found in deps/v8/benchmarks/earley-boyer.js - About 45 mins to fix

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

                  CodeMap.prototype.findEntry = function(addr) {
                    var pageAddr = addr >>> CodeMap.PAGE_ALIGNMENT;
                    if (pageAddr in this.pages_) {
                      // Static code entries can contain "holes" of unnamed code.
                      // In this case, the whole library is assigned to this address.
                  Severity: Minor
                  Found in deps/v8/tools/codemap.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

                  Function processCodeCreation has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      type, kind, start, size, name, maybe_func) {
                  Severity: Minor
                  Found in deps/v8/tools/tickprocessor.js - About 45 mins to fix

                    Function processTick has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    TickProcessor.prototype.processTick = function(pc,
                                                                   ns_since_start,
                                                                   is_external_callback,
                                                                   tos_or_external_callback,
                                                                   vmState,
                    Severity: Minor
                    Found in deps/v8/tools/tickprocessor.js - About 45 mins to fix

                      Function processTickEvent has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              pc, timer, unused_x, unused_y, vmstate, stack) {
                      Severity: Minor
                      Found in deps/v8/tools/profviz/composer.js - About 45 mins to fix

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

                        function bnpModInt(n) {
                          var this_array = this.array;
                          if(n <= 0) return 0;
                          var d = BI_DV%n, r = (this.s<0)?n-1:0;
                          if(this.t > 0)
                        Severity: Minor
                        Found in deps/v8/benchmarks/crypto.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

                        Function addFuncCode has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            type, name, start, size, funcAddr, state) {
                        Severity: Minor
                        Found in deps/v8/tools/profile.js - About 45 mins to fix

                          Function lin_solve2 has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              function lin_solve2(x, x0, y, y0, a, c)
                          Severity: Minor
                          Found in deps/v8/benchmarks/navier-stokes.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                                                if (((k>=i)&&(((state = (sc_states_114[k])), (conf_set = (state[(prev+(1))])), ((conf_set!== false)?(conf_set[(i+(5))]):false))!== false)))
                                                                                    {
                                                                                        (nb_prev_trees = (nb_deriv_trees(prev, i, k, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2)));
                                                                                        (nb_ender_trees = (nb_deriv_trees(ender, k, j, sc_enders_111, sc_steps_112, sc_toks_113, sc_states_114, BgL_sc_nbzd2nts_115zd2)));
                                                                                        (k = (ender_set[(k+(5))]));
                            Severity: Major
                            Found in deps/v8/benchmarks/earley-boyer.js - About 45 mins to fix

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

                              sc_Vector.prototype.sc_toWriteCircleString = function(symb) {
                                  if (this[symb + "use"]) { // use-flag is set. Just use it.
                                  var nb = this[symb + "nb"];
                                  if (this[symb]-- === 0) { // if we are the last use. remove all fields.
                                      delete this[symb];
                              Severity: Minor
                              Found in deps/v8/benchmarks/earley-boyer.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 (((starter_set[(BgL_sc_statezd2num_68zd2+(5))])=== false))
                                                                                              {
                                                                                                  (conf_set_adjoin(sc_state_82, starter_set, starter, BgL_sc_statezd2num_68zd2));
                                                                                                  (sc_l_74 = (sc_l_74.cdr));
                                                                                              }
                              Severity: Major
                              Found in deps/v8/benchmarks/earley-boyer.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                                                while (true) {
                                                                                                    if ((l instanceof sc_Pair))
                                                                                                        {
                                                                                                            (ender = (l.car));
                                                                                                            (ender_set = ((state = (sc_states_129[j])), (state[(ender+(1))])));
                                Severity: Major
                                Found in deps/v8/benchmarks/earley-boyer.js - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language