Skip to content

Commit

Permalink
Removed comment from parser.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
SahilDahekar committed Nov 13, 2024
1 parent 36c4d95 commit 842d098
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions src/core/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,42 +99,6 @@ export async function parse(command: Command, specFile: Specification, options:
return { document, diagnostics, status };
}

// function logDiagnostics(diagnostics: Diagnostic[], command: Command, specFile: Specification, options: ValidateOptions = {}): 'valid' | 'invalid' {
// const logDiagnostics = options['log-diagnostics'];
// const failSeverity = options['fail-severity'] ?? 'error';
// const diagnosticsFormat = options['diagnostics-format'] ?? 'stylish';

// const sourceString = specFile.toSourceString();
// if (diagnostics.length) {
// if (hasFailSeverity(diagnostics, failSeverity)) {
// if (logDiagnostics) {
// command.logToStderr(`\n${sourceString} and/or referenced documents have governance issues.`);
// const diagnosticsOutput = formatOutput(diagnostics, diagnosticsFormat, failSeverity);
// if (options.output) {
// writeValidationDiagnostic(options.output, command, diagnosticsFormat, diagnosticsOutput);
// } else {
// command.log(diagnosticsOutput);
// }
// }
// return ValidationStatus.INVALID;
// }

// if (logDiagnostics) {
// command.log(`\n${sourceString} is valid but has (itself and/or referenced documents) governance issues.`);
// const diagnosticsOutput = formatOutput(diagnostics, diagnosticsFormat, failSeverity);
// if (options.output) {
// writeValidationDiagnostic(options.output, command, diagnosticsFormat, diagnosticsOutput);
// } else {
// command.log(diagnosticsOutput);
// }
// }
// } else if (logDiagnostics) {
// command.log(`\n${sourceString} is valid! ${sourceString} and referenced documents don't have governance issues.`);
// }

// return ValidationStatus.VALID;
// }

function logDiagnostics(
diagnostics: Diagnostic[],
command: Command,
Expand Down

0 comments on commit 842d098

Please sign in to comment.