src/diagnostics.js
/**
 * Analyzes the text document for problems. 
 * @param lineOfText line word is on
 * @param lineIndex line index value
 * @param word keyword
 * @param message diagnostic message
 */
Analyzes the text document for problems.
@param lineOfText line word is on
@param lineIndex line index value
@param word keyword
@param message diagnostic message
Analyzes the text document for problems . @param lineOfText line word is on @param lineIndex line index value @param word keyword @param message diagnostic message
function createDiagnostic(lineOfText, lineIndex, word, message) {
	const index = lineOfText.text.indexOf(word)
	const range = new vscode.Range(lineIndex, index, lineIndex, index + word.length)
	const diagnostic = new vscode.Diagnostic(range, message, vscode.DiagnosticSeverity.Error)
	diagnostic.code = 'swagger-validator'
	return diagnostic
}
function createDiagnostic ( lineOfText , lineIndex , word , message ) { const index = lineOfText . text . indexOf ( word ) const range = new vscode . Range ( lineIndex , index , lineIndex , index + word . length ) const diagnostic = new vscode . Diagnostic ( range , message , vscode . DiagnosticSeverity . Error ) diagnostic . code = 'swagger-validator' return diagnostic }
Analyzes the text document for problems.
Analyzes the text document for problems .