diff options
author | Nicolas Pena <npm@chromium.org> | 2017-06-26 16:54:43 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-06-26 21:14:03 +0000 |
commit | d261b065d09046bbcc6594e48220cff44a371732 (patch) | |
tree | ddf24c1c3a3c07ce76ec77eaa65d4f9364881a5a | |
parent | 4ac12f0e49bfd1e0456a8f2314727deec8648936 (diff) | |
download | pdfium-d261b065d09046bbcc6594e48220cff44a371732.tar.xz |
Improve PNG presubmit check
This CL improves the PNG presubmit check by using ideas from the corpus
repository check.
Change-Id: I3809da4cca69c867335ff28eea6cfcb025efbb4b
Reviewed-on: https://pdfium-review.googlesource.com/6991
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
-rw-r--r-- | PRESUBMIT.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index e8d8458ec0..a7db1230d4 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -279,11 +279,11 @@ def _CheckTestDuplicates(input_api, output_api): def _CheckPNGFormat(input_api, output_api): """Checks that .png files have a format that will be considered valid by our test runners. If a file ends with .png, then it must be of the form - NAME_expected{,mac,win}.pdf.#.png""" + NAME_expected(_(win|mac|linux))?.pdf.#.png""" expected_pattern = input_api.re.compile( - r'.*_expected(_(mac|win))?\.pdf\..*\.png') + r'.+_expected(_(win|mac|linux))?\.pdf\.\d+.png') results = [] - for f in input_api.AffectedFiles(): + for f in input_api.AffectedFiles(include_deletes=False): if not f.LocalPath().endswith('.png'): continue if expected_pattern.match(f.LocalPath()): |