Skip to content

Commit

Permalink
fix: --no-exit-code will allow config errors
Browse files Browse the repository at this point in the history
Configuration errors would block the spell checker from running. Using the `--no-exit-code` option will report the issue, but not prevent it from running to completion.
  • Loading branch information
Jason3S committed Mar 5, 2024
1 parent f5e351b commit 6724e1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cspell/src/app/lint/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export async function runLint(cfg: LintRequest): Promise<RunResult> {
reporter.info(`Config Files Found:\n ${configInfo.source}\n`, MessageTypes.Info);

const configErrors = await countConfigErrors(configInfo);
if (configErrors) return runResult({ errors: configErrors });
if (configErrors && cfg.options.exitCode !== false) return runResult({ errors: configErrors });

// Get Exclusions from the config files.
const { root } = cfg;
Expand Down

0 comments on commit 6724e1a

Please sign in to comment.