Chromium Code Reviews| Index: third_party/WebKit/PRESUBMIT.py |
| diff --git a/third_party/WebKit/PRESUBMIT.py b/third_party/WebKit/PRESUBMIT.py |
| index 3c4d66895e624ff3f255d38e69f9d96d3151d50d..a973818e149c1e37c955c2ecc183750965ce8f2c 100644 |
| --- a/third_party/WebKit/PRESUBMIT.py |
| +++ b/third_party/WebKit/PRESUBMIT.py |
| @@ -39,28 +39,6 @@ def _CheckForNonBlinkVariantMojomIncludes(input_api, output_api): |
| return results |
| -def _CheckForVersionControlConflictsInFile(input_api, f): |
| - pattern = input_api.re.compile('^(?:<<<<<<<|>>>>>>>) |^=======$') |
| - errors = [] |
| - for line_num, line in f.ChangedContents(): |
| - if pattern.match(line): |
| - errors.append(' %s:%d %s' % (f.LocalPath(), line_num, line)) |
| - return errors |
| - |
| - |
| -def _CheckForVersionControlConflicts(input_api, output_api): |
| - """Usually this is not intentional and will cause a compile failure.""" |
| - errors = [] |
| - for f in input_api.AffectedFiles(): |
| - errors.extend(_CheckForVersionControlConflictsInFile(input_api, f)) |
| - |
| - results = [] |
| - if errors: |
| - results.append(output_api.PresubmitError( |
| - 'Version control conflict markers found, please resolve.', errors)) |
| - return results |
| - |
| - |
| def _CheckWatchlist(input_api, output_api): |
| """Check that the WATCHLIST file parses correctly.""" |
| errors = [] |
| @@ -101,25 +79,12 @@ def _CommonChecks(input_api, output_api): |
| input_api, output_api, excluded_paths=_EXCLUDED_PATHS, |
| maxlen=800, license_header=license_header)) |
| results.extend(_CheckForNonBlinkVariantMojomIncludes(input_api, output_api)) |
| - results.extend(_CheckForVersionControlConflicts(input_api, output_api)) |
| - results.extend(_CheckPatchFiles(input_api, output_api)) |
| results.extend(_CheckTestExpectations(input_api, output_api)) |
| results.extend(_CheckChromiumPlatformMacros(input_api, output_api)) |
| results.extend(_CheckWatchlist(input_api, output_api)) |
| - results.extend(_CheckFilePermissions(input_api, output_api)) |
| return results |
| -def _CheckPatchFiles(input_api, output_api): |
| - problems = [f.LocalPath() for f in input_api.AffectedFiles() |
| - if f.LocalPath().endswith(('.orig', '.rej'))] |
| - if problems: |
| - return [output_api.PresubmitError( |
| - "Don't commit .rej and .orig files.", problems)] |
|
Nico
2017/03/23 12:55:58
This feels like a remnant from svn days anyhow – w
|
| - else: |
| - return [] |
| - |
| - |
| def _CheckTestExpectations(input_api, output_api): |
| local_paths = [f.LocalPath() for f in input_api.AffectedFiles()] |
| if any('LayoutTests' in path for path in local_paths): |
| @@ -231,26 +196,6 @@ def _CheckForFailInFile(input_api, f): |
| return errors |
| -def _CheckFilePermissions(input_api, output_api): |
| - """Check that all files have their permissions properly set.""" |
| - if input_api.platform == 'win32': |
| - return [] |
| - args = [input_api.python_executable, |
| - input_api.os_path.join( |
| - input_api.change.RepositoryRoot(), |
| - 'tools/checkperms/checkperms.py'), |
| - '--root', input_api.change.RepositoryRoot()] |
| - for f in input_api.AffectedFiles(): |
| - args += ['--file', f.LocalPath()] |
| - try: |
| - input_api.subprocess.check_output(args) |
| - return [] |
| - except input_api.subprocess.CalledProcessError as error: |
| - return [output_api.PresubmitError( |
| - 'checkperms.py failed:', |
| - long_text=error.output)] |
| - |
| - |
| def _CheckForInvalidPreferenceError(input_api, output_api): |
| pattern = input_api.re.compile('Invalid name for preference: (.+)') |
| results = [] |