зеркало из https://github.com/electron/electron.git
Merge pull request #14690 from electron/lint-runner-support-cc-fix
Lint runner support cc fix
This commit is contained in:
Коммит
4f70f0e66a
|
@ -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',
|
||||
|
@ -98,7 +101,7 @@ function parseCommandLine () {
|
|||
}
|
||||
|
||||
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) {
|
||||
console.log('Failed to find changed files', GitProcess.parseError(result.stderr))
|
||||
process.exit(1)
|
||||
|
|
Загрузка…
Ссылка в новой задаче