Hirse/brackets-outline-list

View on GitHub
thirdparty/htmlparser2.js

Summary

Maintainability
F
2 mos
Test Coverage

File htmlparser2.js has 3326 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**!
 * htmlparser2 version 9.0.0
 * (browserified with Browserify version 17.0.0)
 *
 * MIT License
Severity: Major
Found in thirdparty/htmlparser2.js - About 1 wk to fix

    Function 23 has 689 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"./Tokenizer.js":23,"entities/lib/decode.js":14}],23:[function(require,module,exports){
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.QuoteType = void 0;
    var decode_js_1 = require("entities/lib/decode.js");
    Severity: Major
    Found in thirdparty/htmlparser2.js - About 3 days to fix

      Function Tokenizer has 597 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var Tokenizer = /** @class */ (function () {
          function Tokenizer(_a, cbs) {
              var _b = _a.xmlMode, xmlMode = _b === void 0 ? false : _b, _c = _a.decodeEntities, decodeEntities = _c === void 0 ? true : _c;
              var _this = this;
              this.cbs = cbs;
      Severity: Major
      Found in thirdparty/htmlparser2.js - About 2 days to fix

        Function 22 has 435 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{"./decode.js":14,"./encode.js":16,"./escape.js":17}],22:[function(require,module,exports){
        "use strict";
        var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
            if (k2 === undefined) k2 = k;
            var desc = Object.getOwnPropertyDescriptor(m, k);
        Severity: Major
        Found in thirdparty/htmlparser2.js - About 2 days to fix

          Function 14 has 355 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{"domhandler":4}],14:[function(require,module,exports){
          "use strict";
          var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
              if (k2 === undefined) k2 = k;
              var desc = Object.getOwnPropertyDescriptor(m, k);
          Severity: Major
          Found in thirdparty/htmlparser2.js - About 1 day to fix

            Function 5 has 354 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{"./node.js":5,"domelementtype":3}],5:[function(require,module,exports){
            "use strict";
            var __extends = (this && this.__extends) || (function () {
                var extendStatics = function (d, b) {
                    extendStatics = Object.setPrototypeOf ||
            Severity: Major
            Found in thirdparty/htmlparser2.js - About 1 day to fix

              Function Parser has 310 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var Parser = /** @class */ (function () {
                  function Parser(cbs, options) {
                      if (options === void 0) { options = {}; }
                      var _a, _b, _c, _d, _e;
                      this.options = options;
              Severity: Major
              Found in thirdparty/htmlparser2.js - About 1 day to fix

                Function 2 has 199 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                },{}],2:[function(require,module,exports){
                "use strict";
                var __assign = (this && this.__assign) || function () {
                    __assign = Object.assign || function(t) {
                        for (var s, i = 1, n = arguments.length; i < n; i++) {
                Severity: Major
                Found in thirdparty/htmlparser2.js - About 7 hrs to fix

                  Function EntityDecoder has 193 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var EntityDecoder = /** @class */ (function () {
                      function EntityDecoder(
                      /** The tree used to decode entities. */
                      decodeTree,
                      /**
                  Severity: Major
                  Found in thirdparty/htmlparser2.js - About 7 hrs to fix

                    Function 4 has 148 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    },{}],4:[function(require,module,exports){
                    "use strict";
                    var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
                        if (k2 === undefined) k2 = k;
                        var desc = Object.getOwnPropertyDescriptor(m, k);
                    Severity: Major
                    Found in thirdparty/htmlparser2.js - About 5 hrs to fix

                      Function 6 has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      },{"domelementtype":3}],6:[function(require,module,exports){
                      "use strict";
                      Object.defineProperty(exports, "__esModule", { value: true });
                      exports.getFeed = void 0;
                      var stringify_js_1 = require("./stringify.js");
                      Severity: Major
                      Found in thirdparty/htmlparser2.js - About 5 hrs to fix

                        Function DomHandler has 121 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        var DomHandler = /** @class */ (function () {
                            /**
                             * @param callback Called once parsing has completed.
                             * @param options Settings for the handler.
                             * @param elementCB Callback whenever a tag is closed.
                        Severity: Major
                        Found in thirdparty/htmlparser2.js - About 4 hrs to fix

                          Function parse has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              Tokenizer.prototype.parse = function () {
                                  while (this.shouldContinue()) {
                                      var c = this.buffer.charCodeAt(this.index - this.offset);
                                      switch (this.state) {
                                          case State.Text: {
                          Severity: Major
                          Found in thirdparty/htmlparser2.js - About 4 hrs to fix

                            Function 1 has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.htmlparser2 = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
                            "use strict";
                            Object.defineProperty(exports, "__esModule", { value: true });
                            exports.attributeNames = exports.elementNames = void 0;
                            exports.elementNames = new Map([
                            Severity: Major
                            Found in thirdparty/htmlparser2.js - About 4 hrs to fix

                              Function 10 has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              },{"./querying.js":11,"domhandler":4}],10:[function(require,module,exports){
                              "use strict";
                              Object.defineProperty(exports, "__esModule", { value: true });
                              exports.prepend = exports.prependChild = exports.append = exports.appendChild = exports.replaceElement = exports.removeElement = void 0;
                              /**
                              Severity: Major
                              Found in thirdparty/htmlparser2.js - About 4 hrs to fix

                                Function 11 has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                },{}],11:[function(require,module,exports){
                                "use strict";
                                Object.defineProperty(exports, "__esModule", { value: true });
                                exports.findAll = exports.existsOne = exports.findOne = exports.findOneChild = exports.find = exports.filter = void 0;
                                var domhandler_1 = require("domhandler");
                                Severity: Major
                                Found in thirdparty/htmlparser2.js - About 3 hrs to fix

                                  Function 7 has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  },{"./legacy.js":9,"./stringify.js":12}],7:[function(require,module,exports){
                                  "use strict";
                                  Object.defineProperty(exports, "__esModule", { value: true });
                                  exports.uniqueSort = exports.compareDocumentPosition = exports.DocumentPosition = exports.removeSubsets = void 0;
                                  var domhandler_1 = require("domhandler");
                                  Severity: Major
                                  Found in thirdparty/htmlparser2.js - About 3 hrs to fix

                                    Function 21 has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    },{}],21:[function(require,module,exports){
                                    "use strict";
                                    Object.defineProperty(exports, "__esModule", { value: true });
                                    exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLAttribute = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.DecodingMode = exports.EntityDecoder = exports.encodeHTML5 = exports.encodeHTML4 = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = exports.EncodingMode = exports.EntityLevel = void 0;
                                    var decode_js_1 = require("./decode.js");
                                    Severity: Major
                                    Found in thirdparty/htmlparser2.js - About 3 hrs to fix

                                      Function 9 has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      },{"./feeds.js":6,"./helpers.js":7,"./legacy.js":9,"./manipulation.js":10,"./querying.js":11,"./stringify.js":12,"./traversal.js":13,"domhandler":4}],9:[function(require,module,exports){
                                      "use strict";
                                      Object.defineProperty(exports, "__esModule", { value: true });
                                      exports.getElementsByTagType = exports.getElementsByTagName = exports.getElementById = exports.getElements = exports.testElement = void 0;
                                      var domhandler_1 = require("domhandler");
                                      Severity: Major
                                      Found in thirdparty/htmlparser2.js - About 3 hrs to fix

                                        Function 17 has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        },{"./escape.js":17,"./generated/encode-html.js":20}],17:[function(require,module,exports){
                                        "use strict";
                                        Object.defineProperty(exports, "__esModule", { value: true });
                                        exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.getCodePoint = exports.xmlReplacer = void 0;
                                        exports.xmlReplacer = /["&'<>$\x80-\uFFFF]/g;
                                        Severity: Major
                                        Found in thirdparty/htmlparser2.js - About 2 hrs to fix

                                          Function 24 has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                          },{"entities/lib/decode.js":14}],24:[function(require,module,exports){
                                          "use strict";
                                          var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
                                              if (k2 === undefined) k2 = k;
                                              var desc = Object.getOwnPropertyDescriptor(m, k);
                                          Severity: Major
                                          Found in thirdparty/htmlparser2.js - About 2 hrs to fix

                                            Function 13 has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                            },{"dom-serializer":2,"domelementtype":3,"domhandler":4}],13:[function(require,module,exports){
                                            "use strict";
                                            Object.defineProperty(exports, "__esModule", { value: true });
                                            exports.prevElementSibling = exports.nextElementSibling = exports.getName = exports.hasAttrib = exports.getAttributeValue = exports.getSiblings = exports.getParent = exports.getChildren = void 0;
                                            var domhandler_1 = require("domhandler");
                                            Severity: Major
                                            Found in thirdparty/htmlparser2.js - About 2 hrs to fix

                                              Function cloneNode has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                              function cloneNode(node, recursive) {
                                                  if (recursive === void 0) { recursive = false; }
                                                  var result;
                                                  if (isText(node)) {
                                                      result = new Text(node.data);
                                              Severity: Major
                                              Found in thirdparty/htmlparser2.js - About 2 hrs to fix

                                                Function 15 has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                },{"./decode_codepoint.js":15,"./generated/decode-data-html.js":18,"./generated/decode-data-xml.js":19}],15:[function(require,module,exports){
                                                "use strict";
                                                // Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134
                                                var _a;
                                                Object.defineProperty(exports, "__esModule", { value: true });
                                                Severity: Major
                                                Found in thirdparty/htmlparser2.js - About 2 hrs to fix

                                                  Function 16 has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                  },{}],16:[function(require,module,exports){
                                                  "use strict";
                                                  var __importDefault = (this && this.__importDefault) || function (mod) {
                                                      return (mod && mod.__esModule) ? mod : { "default": mod };
                                                  };
                                                  Severity: Major
                                                  Found in thirdparty/htmlparser2.js - About 2 hrs to fix

                                                    Function 12 has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                    },{"domhandler":4}],12:[function(require,module,exports){
                                                    "use strict";
                                                    var __importDefault = (this && this.__importDefault) || function (mod) {
                                                        return (mod && mod.__esModule) ? mod : { "default": mod };
                                                    };
                                                    Severity: Major
                                                    Found in thirdparty/htmlparser2.js - About 2 hrs to fix

                                                      Function Element has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                      var Element = /** @class */ (function (_super) {
                                                          __extends(Element, _super);
                                                          /**
                                                           * @param name Name of the tag, eg. `div`, `span`.
                                                           * @param attribs Object mapping attribute names to attribute values.
                                                      Severity: Minor
                                                      Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                        Function Node has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                        var Node = /** @class */ (function () {
                                                            function Node() {
                                                                /** Parent of the node */
                                                                this.parent = null;
                                                                /** Previous sibling */
                                                        Severity: Minor
                                                        Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                          Consider simplifying this complex logical expression.
                                                          Open

                                                                  else if (this.state === State.InTagName ||
                                                                      this.state === State.BeforeAttributeName ||
                                                                      this.state === State.BeforeAttributeValue ||
                                                                      this.state === State.AfterAttributeName ||
                                                                      this.state === State.InAttributeName ||
                                                          Severity: Critical
                                                          Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                            Function getAtomFeed has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                            function getAtomFeed(feedRoot) {
                                                                var _a;
                                                                var childs = feedRoot.children;
                                                                var feed = {
                                                                    type: "atom",
                                                            Severity: Minor
                                                            Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                              Function compareDocumentPosition has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                              function compareDocumentPosition(nodeA, nodeB) {
                                                                  var aParents = [];
                                                                  var bParents = [];
                                                                  if (nodeA === nodeB) {
                                                                      return 0;
                                                              Severity: Minor
                                                              Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                                Function renderTag has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                function renderTag(elem, opts) {
                                                                    var _a;
                                                                    // Handle SVG / MathML in HTML
                                                                    if (opts.xmlMode === "foreign") {
                                                                        /* Fix up mixed-case element names */
                                                                Severity: Minor
                                                                Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                                  Function encodeHTMLTrieRe has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                  function encodeHTMLTrieRe(regExp, str) {
                                                                      var ret = "";
                                                                      var lastIdx = 0;
                                                                      var match;
                                                                      while ((match = regExp.exec(str)) !== null) {
                                                                  Severity: Minor
                                                                  Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                                    Function NodeWithChildren has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                    var NodeWithChildren = /** @class */ (function (_super) {
                                                                        __extends(NodeWithChildren, _super);
                                                                        /**
                                                                         * @param children Children of the node. Only certain node types can have children.
                                                                         */
                                                                    Severity: Minor
                                                                    Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                                      Function stateInSpecialTag has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                          Tokenizer.prototype.stateInSpecialTag = function (c) {
                                                                              if (this.sequenceIndex === this.currentSequence.length) {
                                                                                  if (c === CharCodes.Gt || isWhitespace(c)) {
                                                                                      var endOfText = this.index - this.currentSequence.length;
                                                                                      if (this.sectionStart < endOfText) {
                                                                      Severity: Minor
                                                                      Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                                        Function 8 has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                        },{"domhandler":4}],8:[function(require,module,exports){
                                                                        "use strict";
                                                                        var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
                                                                            if (k2 === undefined) k2 = k;
                                                                            var desc = Object.getOwnPropertyDescriptor(m, k);
                                                                        Severity: Minor
                                                                        Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                                          Function onclosetag has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                              Parser.prototype.onclosetag = function (start, endIndex) {
                                                                                  var _a, _b, _c, _d, _e, _f, _g, _h;
                                                                                  this.endIndex = endIndex;
                                                                                  var name = this.getSlice(start, endIndex);
                                                                                  if (this.lowerCaseTagNames) {
                                                                          Severity: Minor
                                                                          Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                                            Function 3 has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                            },{"./foreignNames.js":1,"domelementtype":3,"entities":21}],3:[function(require,module,exports){
                                                                            "use strict";
                                                                            Object.defineProperty(exports, "__esModule", { value: true });
                                                                            exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;
                                                                            /** Types of elements found in htmlparser2's DOM */
                                                                            Severity: Minor
                                                                            Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                                              Function stateNamedEntity has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                                  EntityDecoder.prototype.stateNamedEntity = function (str, offset) {
                                                                                      var decodeTree = this.decodeTree;
                                                                                      var current = decodeTree[this.treeIndex];
                                                                                      // The mask is the number of bytes of the value, including the current byte.
                                                                                      var valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
                                                                              Severity: Minor
                                                                              Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                                                Function stateBeforeTagName has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                    Tokenizer.prototype.stateBeforeTagName = function (c) {
                                                                                        if (c === CharCodes.ExclamationMark) {
                                                                                            this.state = State.BeforeDeclaration;
                                                                                            this.sectionStart = this.index + 1;
                                                                                        }
                                                                                Severity: Minor
                                                                                Found in thirdparty/htmlparser2.js - About 1 hr to fix

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

                                                                                  function getRssFeed(feedRoot) {
                                                                                      var _a, _b;
                                                                                      var childs = (_b = (_a = getOneElement("channel", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];
                                                                                      var feed = {
                                                                                          type: feedRoot.name.substr(0, 3),
                                                                                  Severity: Minor
                                                                                  Found in thirdparty/htmlparser2.js - About 1 hr to fix

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

                                                                                    function determineBranch(decodeTree, current, nodeIdx, char) {
                                                                                        var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
                                                                                        var jumpOffset = current & BinTrieFlags.JUMP_TABLE;
                                                                                        // Case 1: Single branch encoded in jump offset
                                                                                        if (branchCount === 0) {
                                                                                    Severity: Minor
                                                                                    Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                                                      Consider simplifying this complex logical expression.
                                                                                      Open

                                                                                              if (!this.htmlMode || this.options.recognizeCDATA) {
                                                                                                  (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);
                                                                                                  (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);
                                                                                                  (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);
                                                                                              }
                                                                                      Severity: Major
                                                                                      Found in thirdparty/htmlparser2.js - About 1 hr to fix

                                                                                        Consider simplifying this complex logical expression.
                                                                                        Open

                                                                                            if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false &&
                                                                                                !(!opts.xmlMode &&
                                                                                                    elem.parent &&
                                                                                                    unencodedElements.has(elem.parent.name))) {
                                                                                                data =
                                                                                        Severity: Major
                                                                                        Found in thirdparty/htmlparser2.js - About 40 mins to fix

                                                                                          Function addConditionally has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                          Open

                                                                                          function addConditionally(obj, prop, tagName, where, recurse) {
                                                                                          Severity: Minor
                                                                                          Found in thirdparty/htmlparser2.js - About 35 mins to fix

                                                                                            Avoid too many return statements within this function.
                                                                                            Open

                                                                                                return DocumentPosition.PRECEDING;
                                                                                            Severity: Major
                                                                                            Found in thirdparty/htmlparser2.js - About 30 mins to fix

                                                                                              Avoid too many return statements within this function.
                                                                                              Open

                                                                                                      return DocumentPosition.PRECEDING | DocumentPosition.CONTAINS;
                                                                                              Severity: Major
                                                                                              Found in thirdparty/htmlparser2.js - About 30 mins to fix

                                                                                                Avoid too many return statements within this function.
                                                                                                Open

                                                                                                    return "";
                                                                                                Severity: Major
                                                                                                Found in thirdparty/htmlparser2.js - About 30 mins to fix

                                                                                                  Avoid too many return statements within this function.
                                                                                                  Open

                                                                                                          return (0, encode_js_1.encodeHTML)(data);
                                                                                                  Severity: Major
                                                                                                  Found in thirdparty/htmlparser2.js - About 30 mins to fix

                                                                                                    Avoid too many return statements within this function.
                                                                                                    Open

                                                                                                        return (0, escape_js_1.encodeXML)(data);
                                                                                                    Severity: Major
                                                                                                    Found in thirdparty/htmlparser2.js - About 30 mins to fix

                                                                                                      Avoid too many return statements within this function.
                                                                                                      Open

                                                                                                                      return this.stateNamedEntity(str, offset);
                                                                                                      Severity: Major
                                                                                                      Found in thirdparty/htmlparser2.js - About 30 mins to fix

                                                                                                        Avoid too many return statements within this function.
                                                                                                        Open

                                                                                                                        return this.stateNumericHex(str, offset);
                                                                                                        Severity: Major
                                                                                                        Found in thirdparty/htmlparser2.js - About 30 mins to fix

                                                                                                          Avoid too many return statements within this function.
                                                                                                          Open

                                                                                                                          return 0;
                                                                                                          Severity: Major
                                                                                                          Found in thirdparty/htmlparser2.js - About 30 mins to fix

                                                                                                            Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.htmlparser2 = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
                                                                                                            "use strict";
                                                                                                            Object.defineProperty(exports, "__esModule", { value: true });
                                                                                                            exports.attributeNames = exports.elementNames = void 0;
                                                                                                            exports.elementNames = new Map([
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 4 other locations - About 1 day to fix
                                                                                                            thirdparty/espree.js on lines 31..8041
                                                                                                            thirdparty/php-parser.js on lines 35..8743
                                                                                                            thirdparty/postcss-safe-parser.js on lines 26..6614
                                                                                                            thirdparty/promise.js on lines 28..665

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 300.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
                                                                                                                if (k2 === undefined) k2 = k;
                                                                                                                var desc = Object.getOwnPropertyDescriptor(m, k);
                                                                                                                if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
                                                                                                                  desc = { enumerable: true, get: function() { return m[k]; } };
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 5 other locations - About 7 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 144..154
                                                                                                            thirdparty/htmlparser2.js on lines 421..431
                                                                                                            thirdparty/htmlparser2.js on lines 1399..1409
                                                                                                            thirdparty/htmlparser2.js on lines 3086..3096
                                                                                                            thirdparty/htmlparser2.js on lines 4371..4381

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 192.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
                                                                                                                if (k2 === undefined) k2 = k;
                                                                                                                var desc = Object.getOwnPropertyDescriptor(m, k);
                                                                                                                if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
                                                                                                                  desc = { enumerable: true, get: function() { return m[k]; } };
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 5 other locations - About 7 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 421..431
                                                                                                            thirdparty/htmlparser2.js on lines 1399..1409
                                                                                                            thirdparty/htmlparser2.js on lines 2111..2121
                                                                                                            thirdparty/htmlparser2.js on lines 3086..3096
                                                                                                            thirdparty/htmlparser2.js on lines 4371..4381

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 192.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
                                                                                                                if (k2 === undefined) k2 = k;
                                                                                                                var desc = Object.getOwnPropertyDescriptor(m, k);
                                                                                                                if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
                                                                                                                  desc = { enumerable: true, get: function() { return m[k]; } };
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 5 other locations - About 7 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 144..154
                                                                                                            thirdparty/htmlparser2.js on lines 421..431
                                                                                                            thirdparty/htmlparser2.js on lines 2111..2121
                                                                                                            thirdparty/htmlparser2.js on lines 3086..3096
                                                                                                            thirdparty/htmlparser2.js on lines 4371..4381

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 192.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
                                                                                                                if (k2 === undefined) k2 = k;
                                                                                                                var desc = Object.getOwnPropertyDescriptor(m, k);
                                                                                                                if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
                                                                                                                  desc = { enumerable: true, get: function() { return m[k]; } };
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 5 other locations - About 7 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 144..154
                                                                                                            thirdparty/htmlparser2.js on lines 1399..1409
                                                                                                            thirdparty/htmlparser2.js on lines 2111..2121
                                                                                                            thirdparty/htmlparser2.js on lines 3086..3096
                                                                                                            thirdparty/htmlparser2.js on lines 4371..4381

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 192.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
                                                                                                                if (k2 === undefined) k2 = k;
                                                                                                                var desc = Object.getOwnPropertyDescriptor(m, k);
                                                                                                                if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
                                                                                                                  desc = { enumerable: true, get: function() { return m[k]; } };
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 5 other locations - About 7 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 144..154
                                                                                                            thirdparty/htmlparser2.js on lines 421..431
                                                                                                            thirdparty/htmlparser2.js on lines 1399..1409
                                                                                                            thirdparty/htmlparser2.js on lines 2111..2121
                                                                                                            thirdparty/htmlparser2.js on lines 3086..3096

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 192.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
                                                                                                                if (k2 === undefined) k2 = k;
                                                                                                                var desc = Object.getOwnPropertyDescriptor(m, k);
                                                                                                                if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
                                                                                                                  desc = { enumerable: true, get: function() { return m[k]; } };
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 5 other locations - About 7 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 144..154
                                                                                                            thirdparty/htmlparser2.js on lines 421..431
                                                                                                            thirdparty/htmlparser2.js on lines 1399..1409
                                                                                                            thirdparty/htmlparser2.js on lines 2111..2121
                                                                                                            thirdparty/htmlparser2.js on lines 4371..4381

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 192.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __assign = (this && this.__assign) || function () {
                                                                                                                __assign = Object.assign || function(t) {
                                                                                                                    for (var s, i = 1, n = arguments.length; i < n; i++) {
                                                                                                                        s = arguments[i];
                                                                                                                        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 5 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 603..613

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 152.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __assign = (this && this.__assign) || function () {
                                                                                                                __assign = Object.assign || function(t) {
                                                                                                                    for (var s, i = 1, n = arguments.length; i < n; i++) {
                                                                                                                        s = arguments[i];
                                                                                                                        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 5 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 133..143

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 152.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            exports.cloneNode = exports.hasChildren = exports.isDocument = exports.isDirective = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = exports.Element = exports.Document = exports.CDATA = exports.NodeWithChildren = exports.ProcessingInstruction = exports.Comment = exports.Text = exports.DataNode = exports.Node = void 0;
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 5 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2960..2960

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 139.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLAttribute = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.DecodingMode = exports.EntityDecoder = exports.encodeHTML5 = exports.encodeHTML4 = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = exports.EncodingMode = exports.EntityLevel = void 0;
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 5 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 615..615

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 139.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                Parser.prototype.ondeclaration = function (start, endIndex) {
                                                                                                                    this.endIndex = endIndex;
                                                                                                                    var value = this.getSlice(start, endIndex);
                                                                                                                    if (this.cbs.onprocessinginstruction) {
                                                                                                                        var name = this.getInstructionName(value);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 4 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3434..3443

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 134.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                Parser.prototype.onprocessinginstruction = function (start, endIndex) {
                                                                                                                    this.endIndex = endIndex;
                                                                                                                    var value = this.getSlice(start, endIndex);
                                                                                                                    if (this.cbs.onprocessinginstruction) {
                                                                                                                        var name = this.getInstructionName(value);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 4 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3423..3432

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 134.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var Text = /** @class */ (function (_super) {
                                                                                                                __extends(Text, _super);
                                                                                                                function Text() {
                                                                                                                    var _this = _super !== null && _super.apply(this, arguments) || this;
                                                                                                                    _this.type = domelementtype_1.ElementType.Text;
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 2 other locations - About 4 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 743..758
                                                                                                            thirdparty/htmlparser2.js on lines 851..866

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 131.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var Document = /** @class */ (function (_super) {
                                                                                                                __extends(Document, _super);
                                                                                                                function Document() {
                                                                                                                    var _this = _super !== null && _super.apply(this, arguments) || this;
                                                                                                                    _this.type = domelementtype_1.ElementType.Root;
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 2 other locations - About 4 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 723..738
                                                                                                            thirdparty/htmlparser2.js on lines 743..758

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 131.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var Comment = /** @class */ (function (_super) {
                                                                                                                __extends(Comment, _super);
                                                                                                                function Comment() {
                                                                                                                    var _this = _super !== null && _super.apply(this, arguments) || this;
                                                                                                                    _this.type = domelementtype_1.ElementType.Comment;
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 2 other locations - About 4 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 723..738
                                                                                                            thirdparty/htmlparser2.js on lines 851..866

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 131.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __importStar = (this && this.__importStar) || function (mod) {
                                                                                                                if (mod && mod.__esModule) return mod;
                                                                                                                var result = {};
                                                                                                                if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
                                                                                                                __setModuleDefault(result, mod);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 3 other locations - About 4 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2127..2133
                                                                                                            thirdparty/htmlparser2.js on lines 3102..3108
                                                                                                            thirdparty/htmlparser2.js on lines 4387..4393

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 115.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __importStar = (this && this.__importStar) || function (mod) {
                                                                                                                if (mod && mod.__esModule) return mod;
                                                                                                                var result = {};
                                                                                                                if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
                                                                                                                __setModuleDefault(result, mod);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 3 other locations - About 4 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 160..166
                                                                                                            thirdparty/htmlparser2.js on lines 3102..3108
                                                                                                            thirdparty/htmlparser2.js on lines 4387..4393

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 115.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __importStar = (this && this.__importStar) || function (mod) {
                                                                                                                if (mod && mod.__esModule) return mod;
                                                                                                                var result = {};
                                                                                                                if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
                                                                                                                __setModuleDefault(result, mod);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 3 other locations - About 4 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 160..166
                                                                                                            thirdparty/htmlparser2.js on lines 2127..2133
                                                                                                            thirdparty/htmlparser2.js on lines 4387..4393

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 115.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __importStar = (this && this.__importStar) || function (mod) {
                                                                                                                if (mod && mod.__esModule) return mod;
                                                                                                                var result = {};
                                                                                                                if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
                                                                                                                __setModuleDefault(result, mod);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 3 other locations - About 4 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 160..166
                                                                                                            thirdparty/htmlparser2.js on lines 2127..2133
                                                                                                            thirdparty/htmlparser2.js on lines 3102..3108

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 115.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                Tokenizer.prototype.stateInDeclaration = function (c) {
                                                                                                                    if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
                                                                                                                        this.cbs.ondeclaration(this.sectionStart, this.index);
                                                                                                                        this.state = State.Text;
                                                                                                                        this.sectionStart = this.index + 1;
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 3 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 4105..4111

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 110.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                Tokenizer.prototype.stateInProcessingInstruction = function (c) {
                                                                                                                    if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
                                                                                                                        this.cbs.onprocessinginstruction(this.sectionStart, this.index);
                                                                                                                        this.state = State.Text;
                                                                                                                        this.sectionStart = this.index + 1;
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 3 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 4098..4104

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 110.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                Tokenizer.prototype.stateInAttributeName = function (c) {
                                                                                                                    if (c === CharCodes.Eq || isEndOfTagSection(c)) {
                                                                                                                        this.cbs.onattribname(this.sectionStart, this.index);
                                                                                                                        this.sectionStart = -1;
                                                                                                                        this.state = State.AfterAttributeName;
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 3 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3969..3976

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 107.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                Tokenizer.prototype.stateInClosingTagName = function (c) {
                                                                                                                    if (c === CharCodes.Gt || isWhitespace(c)) {
                                                                                                                        this.cbs.onclosetag(this.sectionStart, this.index);
                                                                                                                        this.sectionStart = -1;
                                                                                                                        this.state = State.AfterClosingTagName;
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 3 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 4016..4023

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 107.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            (function (DocumentPosition) {
                                                                                                                DocumentPosition[DocumentPosition["DISCONNECTED"] = 1] = "DISCONNECTED";
                                                                                                                DocumentPosition[DocumentPosition["PRECEDING"] = 2] = "PRECEDING";
                                                                                                                DocumentPosition[DocumentPosition["FOLLOWING"] = 4] = "FOLLOWING";
                                                                                                                DocumentPosition[DocumentPosition["CONTAINS"] = 8] = "CONTAINS";
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 3 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2193..2199

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 103.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            (function (EntityDecoderState) {
                                                                                                                EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
                                                                                                                EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
                                                                                                                EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
                                                                                                                EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 3 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 1299..1305

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 103.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            },{}],19:[function(require,module,exports){
                                                                                                            "use strict";
                                                                                                            // Generated using scripts/write-decode-map.ts
                                                                                                            Object.defineProperty(exports, "__esModule", { value: true });
                                                                                                            exports.default = new Uint16Array(
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 2 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2924..2934

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 93.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            },{}],18:[function(require,module,exports){
                                                                                                            "use strict";
                                                                                                            // Generated using scripts/write-decode-map.ts
                                                                                                            Object.defineProperty(exports, "__esModule", { value: true });
                                                                                                            exports.default = new Uint16Array(
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 2 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2934..2944

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 93.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            function getElementsByTagName(tagName, nodes, recurse, limit) {
                                                                                                                if (recurse === void 0) { recurse = true; }
                                                                                                                if (limit === void 0) { limit = Infinity; }
                                                                                                                return (0, querying_js_1.filter)(Checks["tag_name"](tagName), nodes, recurse, limit);
                                                                                                            }
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 2 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 1578..1582

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 79.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            function getElementsByTagType(type, nodes, recurse, limit) {
                                                                                                                if (recurse === void 0) { recurse = true; }
                                                                                                                if (limit === void 0) { limit = Infinity; }
                                                                                                                return (0, querying_js_1.filter)(Checks["tag_type"](type), nodes, recurse, limit);
                                                                                                            }
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 2 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 1562..1566

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 79.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
                                                                                                                Object.defineProperty(o, "default", { enumerable: true, value: v });
                                                                                                            }) : function(o, v) {
                                                                                                                o["default"] = v;
                                                                                                            });
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 3 other locations - About 2 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2122..2126
                                                                                                            thirdparty/htmlparser2.js on lines 3097..3101
                                                                                                            thirdparty/htmlparser2.js on lines 4382..4386

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 78.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
                                                                                                                Object.defineProperty(o, "default", { enumerable: true, value: v });
                                                                                                            }) : function(o, v) {
                                                                                                                o["default"] = v;
                                                                                                            });
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 3 other locations - About 2 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 155..159
                                                                                                            thirdparty/htmlparser2.js on lines 2122..2126
                                                                                                            thirdparty/htmlparser2.js on lines 3097..3101

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 78.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                    else if (this.state === State.InTagName ||
                                                                                                                        this.state === State.BeforeAttributeName ||
                                                                                                                        this.state === State.BeforeAttributeValue ||
                                                                                                                        this.state === State.AfterAttributeName ||
                                                                                                                        this.state === State.InAttributeName ||
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 2 hrs to fix
                                                                                                            thirdparty/espree.js on lines 2275..2280

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 78.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
                                                                                                                Object.defineProperty(o, "default", { enumerable: true, value: v });
                                                                                                            }) : function(o, v) {
                                                                                                                o["default"] = v;
                                                                                                            });
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 3 other locations - About 2 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 155..159
                                                                                                            thirdparty/htmlparser2.js on lines 2122..2126
                                                                                                            thirdparty/htmlparser2.js on lines 4382..4386

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 78.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
                                                                                                                Object.defineProperty(o, "default", { enumerable: true, value: v });
                                                                                                            }) : function(o, v) {
                                                                                                                o["default"] = v;
                                                                                                            });
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 3 other locations - About 2 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 155..159
                                                                                                            thirdparty/htmlparser2.js on lines 3097..3101
                                                                                                            thirdparty/htmlparser2.js on lines 4382..4386

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 78.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __exportStar = (this && this.__exportStar) || function(m, exports) {
                                                                                                                for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
                                                                                                            };
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 2 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 1410..1412

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 76.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __exportStar = (this && this.__exportStar) || function(m, exports) {
                                                                                                                for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
                                                                                                            };
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 2 hrs to fix
                                                                                                            thirdparty/htmlparser2.js on lines 432..434

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 76.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            function nextElementSibling(elem) {
                                                                                                                var _a;
                                                                                                                var next = elem.next;
                                                                                                                while (next !== null && !(0, domhandler_1.isTag)(next))
                                                                                                                    (_a = next, next = _a.next);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2100..2106

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 73.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            function prevElementSibling(elem) {
                                                                                                                var _a;
                                                                                                                var prev = elem.prev;
                                                                                                                while (prev !== null && !(0, domhandler_1.isTag)(prev))
                                                                                                                    (_a = prev, prev = _a.prev);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2084..2090

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 73.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                Object.defineProperty(Node.prototype, "parentNode", {
                                                                                                                    // Read-write aliases for properties
                                                                                                                    /**
                                                                                                                     * Same as {@link parent}.
                                                                                                                     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
                                                                                                            thirdparty/htmlparser2.js on lines 898..912

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 70.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                Object.defineProperty(Element.prototype, "tagName", {
                                                                                                                    // DOM Level 1 aliases
                                                                                                                    /**
                                                                                                                     * Same as {@link name}.
                                                                                                                     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
                                                                                                            thirdparty/htmlparser2.js on lines 634..648

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 70.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                Object.defineProperty(DataNode.prototype, "nodeValue", {
                                                                                                                    /**
                                                                                                                     * Same as {@link data}.
                                                                                                                     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
                                                                                                                     */
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 2 other locations - About 1 hr to fix
                                                                                                            thirdparty/htmlparser2.js on lines 649..662
                                                                                                            thirdparty/htmlparser2.js on lines 814..827

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 69.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                Object.defineProperty(Node.prototype, "previousSibling", {
                                                                                                                    /**
                                                                                                                     * Same as {@link prev}.
                                                                                                                     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
                                                                                                                     */
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 2 other locations - About 1 hr to fix
                                                                                                            thirdparty/htmlparser2.js on lines 703..716
                                                                                                            thirdparty/htmlparser2.js on lines 814..827

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 69.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                Object.defineProperty(NodeWithChildren.prototype, "childNodes", {
                                                                                                                    /**
                                                                                                                     * Same as {@link children}.
                                                                                                                     * [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
                                                                                                                     */
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 2 other locations - About 1 hr to fix
                                                                                                            thirdparty/htmlparser2.js on lines 649..662
                                                                                                            thirdparty/htmlparser2.js on lines 703..716

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 69.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                    if (this.ended) {
                                                                                                                        (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".end() after done!"));
                                                                                                                        return;
                                                                                                                    }
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3536..3539

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 66.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                    if (this.ended) {
                                                                                                                        (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".write() after done!"));
                                                                                                                        return;
                                                                                                                    }
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3553..3556

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 66.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                return (c === CharCodes.Space ||
                                                                                                                    c === CharCodes.NewLine ||
                                                                                                                    c === CharCodes.Tab ||
                                                                                                                    c === CharCodes.FormFeed ||
                                                                                                                    c === CharCodes.CarriageReturn);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 2 other locations - About 1 hr to fix
                                                                                                            thirdparty/espree.js on lines 3090..3090
                                                                                                            thirdparty/espree.js on lines 7308..7310

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 57.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            function isHexadecimalCharacter(code) {
                                                                                                                return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) ||
                                                                                                                    (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F));
                                                                                                            }
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3681..3684

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 56.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            function isASCIIAlpha(c) {
                                                                                                                return ((c >= CharCodes.LowerA && c <= CharCodes.LowerZ) ||
                                                                                                                    (c >= CharCodes.UpperA && c <= CharCodes.UpperZ));
                                                                                                            }
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 1 hr to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2174..2177

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 56.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            exports.hasChildren = exports.isDocument = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = void 0;
                                                                                                            Severity: Minor
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 55 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 1732..1732

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 53.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            exports.findAll = exports.existsOne = exports.findOne = exports.findOneChild = exports.find = exports.filter = void 0;
                                                                                                            Severity: Minor
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 55 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 1414..1414

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 53.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                        case EntityDecoderState.NumericStart: {
                                                                                                                            (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
                                                                                                                            return 0;
                                                                                                                        }
                                                                                                            Severity: Minor
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 50 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2388..2391

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 52.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                    if (this.consumed <= expectedLength) {
                                                                                                                        (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
                                                                                                                        return 0;
                                                                                                                    }
                                                                                                            Severity: Minor
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 50 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2512..2515

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 52.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                    (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, name);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 2 other locations - About 45 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3249..3249
                                                                                                            thirdparty/htmlparser2.js on lines 3460..3460

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 50.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                    (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 2 other locations - About 45 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3297..3297
                                                                                                            thirdparty/htmlparser2.js on lines 3460..3460

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 50.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                    (_e = (_d = this.cbs).onparserinit) === null || _e === void 0 ? void 0 : _e.call(_d, this);
                                                                                                            Severity: Minor
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 45 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3495..3495

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 50.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                    (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this);
                                                                                                            Severity: Minor
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 45 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3241..3241

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 50.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                        (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 2 other locations - About 45 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3249..3249
                                                                                                            thirdparty/htmlparser2.js on lines 3297..3297

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 50.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                    (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 4 other locations - About 40 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3459..3459
                                                                                                            thirdparty/htmlparser2.js on lines 3461..3461
                                                                                                            thirdparty/htmlparser2.js on lines 3465..3465
                                                                                                            thirdparty/htmlparser2.js on lines 3480..3480

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 49.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                        (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 4 other locations - About 40 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3459..3459
                                                                                                            thirdparty/htmlparser2.js on lines 3465..3465
                                                                                                            thirdparty/htmlparser2.js on lines 3480..3480
                                                                                                            thirdparty/htmlparser2.js on lines 3487..3487

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 49.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                        (_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 4 other locations - About 40 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3459..3459
                                                                                                            thirdparty/htmlparser2.js on lines 3461..3461
                                                                                                            thirdparty/htmlparser2.js on lines 3480..3480
                                                                                                            thirdparty/htmlparser2.js on lines 3487..3487

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 49.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                    (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 4 other locations - About 40 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3459..3459
                                                                                                            thirdparty/htmlparser2.js on lines 3461..3461
                                                                                                            thirdparty/htmlparser2.js on lines 3465..3465
                                                                                                            thirdparty/htmlparser2.js on lines 3487..3487

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 49.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 5 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                        (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 4 other locations - About 40 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 3461..3461
                                                                                                            thirdparty/htmlparser2.js on lines 3465..3465
                                                                                                            thirdparty/htmlparser2.js on lines 3480..3480
                                                                                                            thirdparty/htmlparser2.js on lines 3487..3487

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 49.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __importDefault = (this && this.__importDefault) || function (mod) {
                                                                                                                return (mod && mod.__esModule) ? mod : { "default": mod };
                                                                                                            };
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 3 other locations - About 40 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 1891..1893
                                                                                                            thirdparty/htmlparser2.js on lines 2134..2136
                                                                                                            thirdparty/htmlparser2.js on lines 2725..2727

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 48.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __importDefault = (this && this.__importDefault) || function (mod) {
                                                                                                                return (mod && mod.__esModule) ? mod : { "default": mod };
                                                                                                            };
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 3 other locations - About 40 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2134..2136
                                                                                                            thirdparty/htmlparser2.js on lines 2725..2727
                                                                                                            thirdparty/htmlparser2.js on lines 4394..4396

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 48.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __importDefault = (this && this.__importDefault) || function (mod) {
                                                                                                                return (mod && mod.__esModule) ? mod : { "default": mod };
                                                                                                            };
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 3 other locations - About 40 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 1891..1893
                                                                                                            thirdparty/htmlparser2.js on lines 2725..2727
                                                                                                            thirdparty/htmlparser2.js on lines 4394..4396

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 48.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            var __importDefault = (this && this.__importDefault) || function (mod) {
                                                                                                                return (mod && mod.__esModule) ? mod : { "default": mod };
                                                                                                            };
                                                                                                            Severity: Major
                                                                                                            Found in thirdparty/htmlparser2.js and 3 other locations - About 40 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 1891..1893
                                                                                                            thirdparty/htmlparser2.js on lines 2134..2136
                                                                                                            thirdparty/htmlparser2.js on lines 4394..4396

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 48.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                        var href = (_a = getOneElement("link", children)) === null || _a === void 0 ? void 0 : _a.attribs["href"];
                                                                                                            Severity: Minor
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 35 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 1118..1118

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 46.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                    if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
                                                                                                                        this.state = EntityDecoderState.NumericHex;
                                                                                                                        this.consumed += 1;
                                                                                                                        return this.stateNumericHex(str, offset + 1);
                                                                                                                    }
                                                                                                            Severity: Minor
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 35 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2272..2276

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 46.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                        else if (this.state === State.InAttributeValueDq ||
                                                                                                                            this.state === State.InAttributeValueSq ||
                                                                                                                            this.state === State.InAttributeValueNq) {
                                                                                                                            this.cbs.onattribdata(this.sectionStart, this.index);
                                                                                                                            this.sectionStart = this.index;
                                                                                                            Severity: Minor
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 35 mins to fix
                                                                                                            thirdparty/espree.js on lines 3615..3616

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 46.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                var href = (_a = getOneElement("link", childs)) === null || _a === void 0 ? void 0 : _a.attribs["href"];
                                                                                                            Severity: Minor
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 35 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 1101..1101

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 46.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                                            if (str.charCodeAt(offset) === CharCodes.NUM) {
                                                                                                                                this.state = EntityDecoderState.NumericStart;
                                                                                                                                this.consumed += 1;
                                                                                                                                return this.stateNumericStart(str, offset + 1);
                                                                                                                            }
                                                                                                            Severity: Minor
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 35 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 2307..2311

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 46.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            exports.innerText = exports.textContent = exports.getText = exports.getInnerHTML = exports.getOuterHTML = void 0;
                                                                                                            Severity: Minor
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 30 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 1434..1434

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 45.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                            Open

                                                                                                            exports.getElementsByTagType = exports.getElementsByTagName = exports.getElementById = exports.getElements = exports.testElement = void 0;
                                                                                                            Severity: Minor
                                                                                                            Found in thirdparty/htmlparser2.js and 1 other location - About 30 mins to fix
                                                                                                            thirdparty/htmlparser2.js on lines 1895..1895

                                                                                                            Duplicated Code

                                                                                                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                            Tuning

                                                                                                            This issue has a mass of 45.

                                                                                                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                            Refactorings

                                                                                                            Further Reading

                                                                                                            There are no issues that match your filters.

                                                                                                            Category
                                                                                                            Status