yaml-language-server
Version:
29 lines (28 loc) • 1.28 kB
TypeScript
import { Diagnostic } from 'vscode-languageserver-types';
import type { LanguageSettings } from '../yamlLanguageService';
import type { YAMLSchemaService } from './yamlSchemaService';
import type { YAMLDocDiagnostic } from '../utils/parseUtils';
import type { TextDocument } from 'vscode-languageserver-textdocument';
import type { Telemetry } from '../telemetry';
/**
* Convert a YAMLDocDiagnostic to a language server Diagnostic
* @param yamlDiag A YAMLDocDiagnostic from the parser
* @param textDocument TextDocument from the language server client
*/
export declare const yamlDiagToLSDiag: (yamlDiag: YAMLDocDiagnostic, textDocument: TextDocument) => Diagnostic;
export declare class YAMLValidation {
private readonly schemaService;
private readonly telemetry?;
private validationEnabled;
private customTags;
private disableAdditionalProperties;
private yamlVersion;
private validators;
private MATCHES_MULTIPLE;
constructor(schemaService: YAMLSchemaService, telemetry?: Telemetry);
configure(settings: LanguageSettings): void;
doValidation(textDocument: TextDocument, isKubernetes?: boolean): Promise<Diagnostic[]>;
private hasKubernetesModelineSchema;
private getSchemaDiagnostics;
private runAdditionalValidators;
}