Reports an ending spacing error with an appropriate message.
@param {ASTNode} node - A comment node to check.
@param {string} message - An error message to report.
@param {string} match - An array of the matched whitespace characters.
@returns {void}
195284
function reportEnd(node, message, match) {
            context.report({
                node,
                fix(fixer) {
                    if (requireSpace) {
                        return fixer.insertTextAfterRange([node.range[0], node.range[1] - 2], " ");
                    }
                    const end = node.range[1] - 2,
                        start = end - match[0].length;

                    return fixer.replaceTextRange([start, end], "");

                },
                message
            });
        }
478417
function (node, byLastLine, excludeCommas) {
    byLastLine = byLastLine || false;
    excludeCommas = excludeCommas || false;

    var src = context.getSource(node, node.loc.start.column + extraColumnStart);
    var lines = src.split('\n');
    if (byLastLine) {
      src = lines[lines.length - 1];
    } else {
      src = lines[0];
    }

    var skip = excludeCommas ? ',' : '';

    var regExp;
    if (indentType === 'spaces') {
      regExp = new RegExp('^[ ' + skip + ']+');
    } else {
      regExp = new RegExp('^[\t' + skip + ']+');
    }

    var indent = regExp.exec(src);
    return indent ? indent[0].length : 0;
  }
1056244
function validateNesting(node) {
  let queue = [...node.parent.children];
  let child;
  let opener;
  while (queue.length) {
    child = queue.shift();
    opener = child.openingElement;
    if (child.type === 'JSXElement' && opener && (opener.name.name === 'input' || opener.name.name === 'textarea')) {
      return true;
    }
    if (child.children) {
      queue = queue.concat(child.children);
    }
  }
  return false;
}
1258367
function(match) {
			match = $.isFunction(match) ? match : _makeNodeTitleMatcher(match);
			var res = [];
			this.visit(function(n) {
				if (match(n)) {
					res.push(n);
				}
			});
			return res;
		}
690779
function check(node) {
            if (
                node.arguments.length !== 1 &&
                node.callee.type === "Identifier" &&
                node.callee.name === "Array"
            ) {
                context.report({ node, messageId: "preferLiteral" });
            }
        }
550838
function(elem) {
		if (elem) {
			while (isWhitespace(elem.firstChild)) {
				// trim leading whitespace text nodes
				elem.removeChild(elem.firstChild);
			}
			// trim leading whitespace text
			trimPattern(elem.firstChild, LEADING);
			while (isWhitespace(elem.lastChild)) {
				// trim trailing whitespace text nodes
				elem.removeChild(elem.lastChild);
			}
			// trim trailing whitespace text
			trimPattern(elem.lastChild, TRAILING);
		}
	}
233141
function verify(context, node, pattern, flags) {
    try {
        let found = false

        new RegExpValidator({
            onCapturingGroupEnter(_start, name) {
                if (name) {
                    found = true
                }
            },
            onBackreference(_start, _end, ref) {
                if (typeof ref === "string") {
                    found = true
                }
            },
        }).validatePattern(pattern, 0, pattern.length, flags.includes("u"))

        if (found) {
            context.report({ node, messageId: "forbidden" })
        }
    } catch (error) {
        //istanbul ignore else
        if (error.message.startsWith("Invalid regular expression:")) {
            return
        }
        //istanbul ignore next
        throw error
    }
}
848149
function verify(context, node, pattern, flags) {
    try {
        let found = false

        new RegExpValidator({
            onLookaroundAssertionEnter(_start, kind) {
                if (kind === "lookbehind") {
                    found = true
                }
            },
        }).validatePattern(pattern, 0, pattern.length, flags.includes("u"))

        if (found) {
            context.report({ node, messageId: "forbidden" })
        }
    } catch (error) {
        //istanbul ignore else
        if (error.message.startsWith("Invalid regular expression:")) {
            return
        }
        //istanbul ignore next
        throw error
    }
}
201331
function removeWhitespaceError(node) {
            const locStart = node.loc.start;
            const locEnd = node.loc.end;

            errors = errors.filter(({ loc: errorLoc }) => {
                if (errorLoc.line >= locStart.line && errorLoc.line <= locEnd.line) {
                    if (errorLoc.column >= locStart.column && (errorLoc.column <= locEnd.column || errorLoc.line < locEnd.line)) {
                        return false;
                    }
                }
                return true;
            });
        }
576086
function(message) {
		var stack, e = new Error(
			gui.GreatSpirit.DENIAL + (message ? ": " + message : "")
		);
		if (!gui.Client.isExplorer && (stack = e.stack)) {
			if (gui.Client.isWebKit) {
				stack = stack.replace(/^[^\(]+?[\n$]/gm, "").
				replace(/^\s+at\s+/gm, "").
				replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@").
				split("\n");
			} else {
				stack = stack.split("\n");
			}
			stack.shift();
			stack.shift(); // @TODO: shift one more now?
			console.warn(e.message + "\n" + stack);
		} else {
			console.warn(e.message);
		}
	}
638332
function check(node) {
		if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0])) {
			var flags = isString(node.arguments[1]) ? node.arguments[1].value : "";

			if (allowedFlags) {
				flags = flags.replace(new RegExp("[" + allowedFlags + "]", "gi"), "");
			}

			try {
				void new RegExp(node.arguments[0].value);
			} catch (e) {
				context.report(node, e.message);
			}
			if (flags) {
				try {
					var result = parser.parse("/./" + flags, context.parserOptions);
					if (result.body.length > 0) {
						var expressionStatement = result.body[0];
						var regexp = expressionStatement.expression;
						if (regexp && regexp.value === null) {
							context.report(node, ProblemMessages.noInvalidRegexp, {
								arg: flags
							});
						}
					}
				} catch (ex) {
					context.report(node, ProblemMessages.noInvalidRegexp, {
						arg: flags
					});
				}
			}
		}
	}
1060452
function (nodes, indent, excludeCommas) {
    nodes.forEach(function (node) {
      var nodeIndent = getNodeIndent(node, false, excludeCommas);
      if (nodeIndent !== indent) {
        context.report(node, MESSAGE, { gotten: nodeIndent, needed: indent });
      }
    });
  }
527261
function checkSpacing(node) {
            const tagToken = sourceCode.getTokenBefore(node.quasi);
            const literalToken = sourceCode.getFirstToken(node.quasi);
            const hasWhitespace = sourceCode.isSpaceBetweenTokens(tagToken, literalToken);

            if (never && hasWhitespace) {
                context.report({
                    node,
                    loc: tagToken.loc.start,
                    messageId: "unexpected",
                    fix(fixer) {
                        const comments = sourceCode.getCommentsBefore(node.quasi);

                        // Don't fix anything if there's a single line comment after the template tag
                        if (comments.some(comment => comment.type === "Line")) {
                            return null;
                        }

                        return fixer.replaceTextRange(
                            [tagToken.range[1], literalToken.range[0]],
                            comments.reduce((text, comment) => text + sourceCode.getText(comment), "")
                        );
                    }
                });
            } else if (!never && !hasWhitespace) {
                context.report({
                    node,
                    loc: tagToken.loc.start,
                    messageId: "missing",
                    fix(fixer) {
                        return fixer.insertTextAfter(tagToken, " ");
                    }
                });
            }
        }
860605
function _checkCharsetRange(node) {
  node.ranges=K.sortUnique(node.ranges.map(function (range) {
    if (range[0]>range[1]) {
      throw new RegexSyntaxError({
        type:"OutOfOrder",
        lastIndex:range.lastIndex,
        message:"Range ["+range.join('-')+"] out of order in character class!"
      });
    }
    return range.join('');
  }));
}
828213
function validateArraySpacing (node) {
      if (node.elements.length === 0) {
        return
      }

      var first = context.getFirstToken(node)
      var second = context.getFirstToken(node, 1)
      var penultimate = context.getLastToken(node, 1)
      var last = context.getLastToken(node)

      var openingBracketMustBeSpaced =
      (options.objectsInArraysException && second.value === '{') ||
      (options.arraysInArraysException && second.value === '[') ||
      (options.singleElementException && node.elements.length === 1)
        ? !options.spaced : options.spaced

      var closingBracketMustBeSpaced =
      (options.objectsInArraysException && penultimate.value === '}') ||
      (options.arraysInArraysException && penultimate.value === ']') ||
      (options.singleElementException && node.elements.length === 1)
        ? !options.spaced : options.spaced

      // we only care about evenly spaced things
      if (options.either) {
        // newlines at any point means return
        if (!isSameLine(first, last)) {
          return
        }

        // confirm that the object expression/literal is spaced evenly
        if (!isEvenlySpacedAndNotTooLong(node, [first, second], [penultimate, last])) {
          context.report(node, 'Expected consistent spacing')
        }

        return
      }

      if (isSameLine(first, second)) {
        if (openingBracketMustBeSpaced && !isSpaced(first, second)) {
          reportRequiredBeginningSpace(node, first)
        }
        if (!openingBracketMustBeSpaced && isSpaced(first, second)) {
          reportNoBeginningSpace(node, first)
        }
      }

      if (isSameLine(penultimate, last)) {
        if (closingBracketMustBeSpaced && !isSpaced(penultimate, last)) {
          reportRequiredEndingSpace(node, last)
        }
        if (!closingBracketMustBeSpaced && isSpaced(penultimate, last)) {
          reportNoEndingSpace(node, last)
        }
      }
    }
982257
function checkDepth(selector, rule) {
      var depth;
      // Stripping "[...]", "(...)", "+", "~" (the last two might come with
      // spaces) for simplicity and since we don't need those to count depth
      var stripped = selector.replace(/\(.*?\)|\[.*?\]|(\s*)[+~](\s*)/g, []);
      // Trimming redundant spaces
      stripped = stripped.replace(/\s+/g, ' ');
      // Finally find everything between spaces and ">" (possibly with spaces)
      depth = stripped.match(/[^\s>]+/g).length;
      if (depth > max) {
        stylelint.utils.report({
          ruleName: ruleName,
          result: result,
          node: rule,
          message: messages.rejected(selector, max)
        });
      }
    }
1007398
function checkForIrregularWhitespace(node, ignoreTokens) {
            const text = sourceCode.text.slice(node.range[0], node.range[1])
            let match = undefined

            /**
             * Check whether the index is in ignore location.
             * @param {number} index The index.
             * @returns {boolean} `true` if the index is in ignore location.
             */
            function isIgnoreLocation(index) {
                return (
                    ignoreTokens.find(
                        t => t.range[0] <= index && index < t.range[1]
                    ) ||
                    templateTokens.find(
                        t => t.range[0] <= index && index < t.range[1]
                    )
                )
            }

            while ((match = IRREGULAR_WHITESPACE.exec(text)) !== null) {
                const index = node.range[0] + match.index

                if (isIgnoreLocation(index)) {
                    continue
                }

                const code = `0000${sourceCode.text[index]
                    .charCodeAt(0)
                    .toString(16)}`
                    .slice(-4)
                    .toUpperCase()
                context.report({
                    loc: sourceCode.getLocFromIndex(index),
                    messageId: "unexpected",
                    data: { code },
                    fix: defineWhitespaceFix(index),
                })
            }

            while ((match = IRREGULAR_LINE_TERMINATORS.exec(text)) !== null) {
                const index = node.range[0] + match.index

                if (isIgnoreLocation(index)) {
                    continue
                }

                const code = `0000${sourceCode.text[index]
                    .charCodeAt(0)
                    .toString(16)}`
                    .slice(-4)
                    .toUpperCase()
                context.report({
                    loc: sourceCode.getLocFromIndex(index),
                    messageId: "unexpected",
                    data: { code },
                    fix: defineLineTerminatorsFix(index),
                })
            }
        }