function checkProgramForMaxLength(node){// split (honors line-ending)
var lines=sourceCode.lines,// list of comments to ignore
comments=ignoreComments||maxCommentLength||ignoreTrailingComments?sourceCode.getAllComments():[];// we iterate over comments in parallel with the lines
var commentsIndex=0;var strings=getAllStrings(sourceCode);var stringsByLine=strings.reduce(groupByLineNumber,{});var templateLiterals=getAllTemplateLiterals(sourceCode);var templateLiteralsByLine=templateLiterals.reduce(groupByLineNumber,{});var regExpLiterals=getAllRegExpLiterals(sourceCode);var regExpLiteralsByLine=regExpLiterals.reduce(groupByLineNumber,{});lines.forEach(function(line,i){// i is zero-indexed, line numbers are one-indexed
var lineNumber=i+1;/*
                 * if we're checking comment length; we need to know whether this
                 * line is a comment
                 */var lineIsComment=false;/*
                 * We can short-circuit the comment checks if we're already out of
                 * comments to check.
                 */if(commentsIndex<comments.length){var comment=null;// iterate over comments until we find one past the current line
do{comment=comments[++commentsIndex];}while(comment&&comment.loc.start.line<=lineNumber);// and step back by one
comment=comments[--commentsIndex];if(isFullLineComment(line,lineNumber,comment)){lineIsComment=true;}else if(ignoreTrailingComments&&isTrailingComment(line,lineNumber,comment)){line=stripTrailingComment(line,lineNumber,comment);}}if(ignorePattern&&ignorePattern.test(line)||ignoreUrls&&URL_REGEXP.test(line)||ignoreStrings&&stringsByLine[lineNumber]||ignoreTemplateLiterals&&templateLiteralsByLine[lineNumber]||ignoreRegExpLiterals&&regExpLiteralsByLine[lineNumber]){// ignore this line
return;}var lineLength=computeLineLength(line,tabWidth);if(lineIsComment&&ignoreComments){return;}if(lineIsComment&&lineLength>maxCommentLength){context.report({node:node,loc:{line:lineNumber,column:0},message:"Line {{lineNumber}} exceeds the maximum comment line length of {{maxCommentLength}}.",data:{lineNumber:i+1,maxCommentLength:maxCommentLength}});}else if(lineLength>maxLength){context.report({node:node,loc:{line:lineNumber,column:0},message:"Line {{lineNumber}} exceeds the maximum line length of {{maxLength}}.",data:{lineNumber:i+1,maxLength:maxLength}});}});}//--------------------------------------------------------------------------
Check the program for max length
@param {ASTNode} node Node to examine
@returns {void}
@private