Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Fix stdio incompatibility with some third-party clients #604

Merged
merged 4 commits into from
Oct 23, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/providers/validationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function doValidate(

const settings = await context.documentSettings.get(textDocument.uri);
if (!settings.validation.enabled) {
console.log("Validation disabled");
connection?.console.log("Validation disabled");

// this is done to remove the cache as well
const blankDiagnostics = new Map<string, Diagnostic[]>();
Expand All @@ -54,10 +54,10 @@ export async function doValidate(
: settings.validation.lint.path;
const lintAvailability =
await commandRunner.getExecutablePath(lintExecutable);
console.debug("Path for lint: ", lintAvailability);
connection?.console.log(`Path for lint: ${lintAvailability}`);
priyamsahoo marked this conversation as resolved.
Show resolved Hide resolved

if (lintAvailability) {
console.debug("Validating using ansible-lint");
connection?.console.log("Validating using ansible-lint");
priyamsahoo marked this conversation as resolved.
Show resolved Hide resolved
diagnosticsByFile = await context.ansibleLint.doValidate(textDocument);
} else {
connection?.window.showErrorMessage(
Expand All @@ -68,14 +68,14 @@ export async function doValidate(

// validate using ansible-playbook --syntax-check
else {
console.debug("Validating using ansible syntax-check");
connection?.console.log("Validating using ansible syntax-check");

if (isPlaybook(textDocument)) {
console.debug("playbook file");
connection?.console.log("playbook file");
diagnosticsByFile =
await context.ansiblePlaybook.doValidate(textDocument);
} else {
console.debug("non-playbook file");
connection?.console.log("non-playbook file");
diagnosticsByFile = new Map<string, Diagnostic[]>();
}
}
Expand Down
Loading