BuGlessRB/remixml

View on GitHub
remixml.master.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function remixml2js has 497 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

  function /** string */ remixml2js(/** string */ rxmls,/** number= */ flags)
  {     // H: Current element to append in
       // W: Temporary parent element
      // I: Most recent truth value
     // J: Parent element to append the current element to when finished
Severity: Major
Found in remixml.master.js - About 2 days to fix

    File remixml.master.js has 952 lines of code (exceeds 250 allowed). Consider refactoring.
    Wontfix

       /** @license
       ** Remixml v6: XML/HTML-like macro language compiler
      ** Copyright (c) 2018-2022 by Stephen R. van den Berg <srb@cuci.nl>
     ** License: ISC OR GPL-3.0
    ** Sponsored by: Cubic Circle, The Netherlands
    Severity: Major
    Found in remixml.master.js - About 2 days to fix

      Avoid deeply nested control flow statements.
      Invalid

              { if (rm[1])
                  getexclm(/** @type{!Array} */(rm), 1);
                else if (rm[2])
                { rm[0] = "<";
                  getexclm(/** @type{!Array} */(rm), 2);
      Severity: Major
      Found in remixml.master.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Wontfix

                      switch (tag)
                      { case "noparse":
                  if (!noparse++)
                    continue;
                  break;
        Severity: Major
        Found in remixml.master.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

          skipdef:      do
                        {
                  switch (shouldtag)
                          { case "noparse":
                      if(!--noparse)
          Severity: Major
          Found in remixml.master.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Invalid

                          if (ASSERT && closelp)
                            continue;
            Severity: Major
            Found in remixml.master.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Invalid

                            { if (val[""])
                        val = val.join("");
              Severity: Major
              Found in remixml.master.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                              if (!comment)
                              { delete gotparms[""];
                                obj += "W=H;";
                                if (!noparse)
                                { switch (tag)
                Severity: Major
                Found in remixml.master.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Invalid

                                if (!close)
                                { let /** !RegExp|number */ rxend
                           = tag === "script" ? scriptend :
                             tag === "style" ? styleend : 0;
                          if (rxend)
                  Severity: Major
                  Found in remixml.master.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Invalid

                                      if (!(vname >= 0 || args[vname]))
                                        rest[vname] = this[vname];
                    Severity: Major
                    Found in remixml.master.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Invalid

                                    if (!comment)
                                { obj += "try{" + varinsert(varent(/** @type{!Array} */(rm)));
                                      simpleset = 0;
                                }
                      Severity: Major
                      Found in remixml.master.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Invalid

                                      if (gotparms["-"])
                                      { delete gotparms["-"];
                                        tagctx[TS_FLAGS] = TRIMWHITE;
                                      }
                        Severity: Major
                        Found in remixml.master.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Invalid

                                        if ((RUNTIMEDEBUG || ASSERT) && tag !== shouldtag)
                                        { logcontext(tag,
                                           (shouldtag ? "Expected </" + shouldtag + "> got </"
                                                      : missingg) + tag + ">");
                                          if (ASSERT)
                          Severity: Major
                          Found in remixml.master.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Invalid

                                        { if (rm)
                                        lasttoken = params.lastIndex;
                            Severity: Major
                            Found in remixml.master.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Invalid

                                              if (narg !== val)
                                                parent += '="'
                                                 + (val.replace
                                           ? val.replace(ampquotrx, "&dquot;") : val) + '"';
                              Severity: Major
                              Found in remixml.master.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Invalid

                                          if (!comment)
                                              { obj += ";";
                                                tagctx[TS_FLAGS] |= USERTAG;
                                              }
                                Severity: Major
                                Found in remixml.master.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Invalid

                                              if (ASSERT)
                                              { rxmls += "</" + shouldtag + ">";    // Fix it and continue
                                                continue;
                                              }
                                  Severity: Major
                                  Found in remixml.master.js - About 45 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                                    if (!noparse)
                                                    { switch (tag)
                                                      { case "set":
                                                        { obj += letHprefix;
                                                          let vname = getvarparm();
                                    Severity: Major
                                    Found in remixml.master.js - About 40 mins to fix

                                      Function settag has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Wontfix

                                        function /** void */ settag(/** function(!Object):!Array */ tpl,
                                         /** !Object */ $,/** string */ name,/** string= */ scope,
                                         /** string= */ args)
                                      Severity: Minor
                                      Found in remixml.master.js - About 35 mins to fix

                                        There are no issues that match your filters.

                                        Category
                                        Status