Skip to content

Commit

Permalink
check user arguments on loadConfig, respect --strict
Browse files Browse the repository at this point in the history
  • Loading branch information
idanpa committed Feb 2, 2020
1 parent b60008f commit 284e03c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/checkpatchProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ export default class CheckpatchProvider implements vscode.CodeActionProvider {
this.diagnosticCollection.clear();

// testing given configuration:
var re = /total: \d* errors, \d* warnings, \d* lines checked/g;
var args = ['--no-tree'];
var re = /total: \d* errors, \d* warnings,( \d* checks,)? \d* lines checked/g;
let args = this.linterConfig.args.slice();
args.push('--no-tree - ');
let childProcess = cp.spawnSync(this.linterConfig.path, args, { shell: true, input: ' ' });
if (childProcess.pid && re.test(childProcess.stdout.toString())) {
// all good
Expand Down

0 comments on commit 284e03c

Please sign in to comment.