private static ErrorLine FindErrorsInLine(TextDocument document, DocumentLine line, string lineText, bool commandSectionCheckRequired) { if (LineHelper.IsSectionHeaderLine(lineText)) { return(FindErrorsInSectionHeaderLine(line, lineText)); } else { if (commandSectionCheckRequired && LineHelper.IsLineInStandardStringSection(document, line)) { return(null); } else if (commandSectionCheckRequired && LineHelper.IsLineInNGStringSection(document, line)) { return(FindErrorsInNGStringLine(line, lineText)); } else { return(FindErrorsInCommandLine(document, line, lineText, commandSectionCheckRequired)); } } }