Skip to content

Commit 284e03c

Browse files
committed
check user arguments on loadConfig, respect --strict
1 parent b60008f commit 284e03c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/checkpatchProvider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ export default class CheckpatchProvider implements vscode.CodeActionProvider {
6666
this.diagnosticCollection.clear();
6767

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

0 commit comments

Comments
 (0)