Merge pull request #14690 from electron/lint-runner-support-cc-fix
Lint runner support cc fix
This commit is contained in:
commit
4f70f0e66a
1 changed files with 5 additions and 2 deletions
|
@ -59,7 +59,10 @@ const LINTERS = [ {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (result.status) process.exit(result.status)
|
if (result.status) {
|
||||||
|
if (opts.fix) spawnAndCheckExitCode('python', ['script/run-clang-format.py', ...filenames])
|
||||||
|
process.exit(result.status)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
key: 'python',
|
key: 'python',
|
||||||
|
@ -98,7 +101,7 @@ function parseCommandLine () {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function findChangedFiles (top) {
|
async function findChangedFiles (top) {
|
||||||
const result = await GitProcess.exec(['diff', 'HEAD', '--name-only'], top)
|
const result = await GitProcess.exec(['diff', '--name-only', '--cached'], top)
|
||||||
if (result.exitCode !== 0) {
|
if (result.exitCode !== 0) {
|
||||||
console.log('Failed to find changed files', GitProcess.parseError(result.stderr))
|
console.log('Failed to find changed files', GitProcess.parseError(result.stderr))
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
|
|
Loading…
Reference in a new issue