(input_api, output_api)
| 419 | |
| 420 | |
| 421 | def CheckNoUncheckedFiles(input_api, output_api): |
| 422 | if _IsEnvCog(input_api): |
| 423 | return [] |
| 424 | |
| 425 | process = input_api.subprocess.Popen(['git', 'diff', '--exit-code'], |
| 426 | stdout=input_api.subprocess.PIPE, |
| 427 | stderr=input_api.subprocess.STDOUT) |
| 428 | out, _ = process.communicate() |
| 429 | if process.returncode != 0: |
| 430 | files_changed_process = input_api.subprocess.Popen( |
| 431 | ['git', 'diff'], |
| 432 | stdout=input_api.subprocess.PIPE, |
| 433 | stderr=input_api.subprocess.STDOUT) |
| 434 | files_changed, _ = files_changed_process.communicate() |
| 435 | |
| 436 | return [ |
| 437 | output_api.PresubmitError( |
| 438 | 'You have changed files that need to be committed:\n%s' % |
| 439 | (files_changed.decode('utf-8').strip())) |
| 440 | ] |
| 441 | |
| 442 | return [] |
| 443 | |
| 444 | |
| 445 | def CheckKnownContextValues(input_api, output_api): |
nothing calls this directly
no test coverage detected