Index: chrome/common/extensions/PRESUBMIT.py |
diff --git a/chrome/common/extensions/PRESUBMIT.py b/chrome/common/extensions/PRESUBMIT.py |
index 46865d19148ea413d23171ceb86d27ce43e05718..0dcf1c0427b21bb288bb6e0490a29087f11f2fee 100644 |
--- a/chrome/common/extensions/PRESUBMIT.py |
+++ b/chrome/common/extensions/PRESUBMIT.py |
@@ -32,12 +32,10 @@ REBUILD_INSTRUCTIONS = ( |
def CheckChangeOnUpload(input_api, output_api): |
- return (CheckPresubmitChanges(input_api, output_api) + |
- CheckDocChanges(input_api, output_api)) |
+ return CheckPresubmitChanges(input_api, output_api) |
def CheckChangeOnCommit(input_api, output_api): |
- return (CheckPresubmitChanges(input_api, output_api) + |
- CheckDocChanges(input_api, output_api, strict=False)) |
+ return CheckPresubmitChanges(input_api, output_api) |
def CheckPresubmitChanges(input_api, output_api): |
for PRESUBMIT_PATH in input_api.LocalPaths(): |
@@ -45,46 +43,6 @@ def CheckPresubmitChanges(input_api, output_api): |
['./PRESUBMIT_test.py']) |
return [] |
-def CheckDocChanges(input_api, output_api, strict=True): |
- warnings = [] |
- |
- for af in input_api.AffectedFiles(): |
- path = af.LocalPath() |
- if IsSkippedFile(path, input_api): |
- continue |
- |
- elif (IsApiFile(path, input_api) or |
- IsBuildFile(path, input_api) or |
- IsTemplateFile(path, input_api) or |
- IsJsFile(path, input_api) or |
- IsCssFile(path, input_api)): |
- # These files do not always cause changes to the generated docs |
- # so we can ignore them if not running strict checks. |
- if strict and not DocsGenerated(input_api): |
- warnings.append('Docs out of sync with %s changes.' % path) |
- |
- elif IsStaticDoc(path, input_api): |
- if not StaticDocBuilt(af, input_api): |
- warnings.append('Changes to %s not reflected in generated doc.' % path) |
- |
- elif IsSampleFile(path, input_api): |
- if not SampleZipped(af, input_api): |
- warnings.append('Changes to sample %s have not been re-zipped.' % path) |
- |
- elif IsGeneratedDoc(path, input_api): |
- if not NonGeneratedFilesEdited(input_api): |
- warnings.append('Changes to generated doc %s not reflected in ' |
- 'non-generated files.' % path) |
- |
- if warnings: |
- warnings.sort() |
- warnings = [' - %s\n' % w for w in warnings] |
- # Prompt user if they want to continue. |
- return [output_api.PresubmitPromptWarning(REBUILD_WARNING + '\n' + |
- ''.join(warnings) + |
- REBUILD_INSTRUCTIONS)] |
- return [] |
- |
def IsSkippedFile(path, input_api): |
return input_api.os_path.basename(path) in EXCEPTIONS |