Commit Graph

238 Commits (e7a7fc42b6bf58d35ecea2dd5c543f1e22e59880)

Author SHA1 Message Date
Vadim Shtayura 2174136d25 [cipd] Add presubmit support for checking *.digests file.
Not enabling it yet, since PRESUBMIT.py uses presubmit_canned_checks.py from
depot_tools at HEAD, not from a CL (thus enabling this check in this CL will
make it fail the presubmit).

R=nodir@chromium.org
BUG=870166

Change-Id: I97802ec37f1f7513dfca3950f7f38a5c51ab0350
Reviewed-on: https://chromium-review.googlesource.com/1227432
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
7 years ago
Robert Sesek 16a396e431 Clarify OWNERS error if using TBR.
The message was previously not clear that if the entire CL has any change
to an OWNERS file, TBR will not apply.

Change-Id: Ib30a93f80196f45b02a29701faab7cf581e37f50
Reviewed-on: https://chromium-review.googlesource.com/1176321
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
7 years ago
Nodir Turakulov 425d9ce2d3 Allow CheckPatchFormatted to cause a failure
Extend CheckPatchFormatted to allow other presubmit result types.

Change-Id: I1c592d73657aa9c8a8fd04dbd66f086ce7bb1274
Reviewed-on: https://chromium-review.googlesource.com/1100127
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
7 years ago
Sergiy Byelozyorov 621fe6f9b5 Add ability to whitelist bot accounts as valid authors
Example usage: https://crrev.com/c/1074367

R=machenbach@chromium.org

Bug: 831171
Change-Id: Ic3deff5040a268e10161ccce635f06b7f8c08d36
Reviewed-on: https://chromium-review.googlesource.com/1074368
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
7 years ago
Nodir Turakulov 0ae14e9aad [presubmit] Add python formatting check
Add check_python parameter to CheckPatchFormatted to check that python
files are well formatted.

Change-Id: Ibd20d5ec9d1d5142a26f7f4cd5f05c51223da6ca
Reviewed-on: https://chromium-review.googlesource.com/1081342
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Jeremy Roman 5ae86d2021 Update canned PRESUBMIT checks to report that TBR does not apply to OWNERS.
Expansion of the tests to check for this are required.

Change-Id: Iae6294501659738df5097ce5a72da79e72818d98
Reviewed-on: https://chromium-review.googlesource.com/1030956
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
7 years ago
Edward Lesmes cb62e48b54 Check format of OWNERS files in PRESUBMIT and PanProjectChecks.
Bug: 789773
Change-Id: Iaa721c9971d1834dd796a9cd28a28a83b6482e05
Reviewed-on: https://chromium-review.googlesource.com/1019975
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lesmes 067ef5d894 Add support for checking that OWNERS files are correctly formatted.
Bug: 789773
Change-Id: I4c6c676a821fad33a34ef6c46468af95cdf6c0ec
Reviewed-on: https://chromium-review.googlesource.com/1020073
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
7 years ago
John Budorick 161623779e presubmit: don't attempt to verify nonexistent vpython specs.
Bug: 834180
Change-Id: I431431e4fdf99c16c5fc3dbc7ed999b0c8da24bc
Reviewed-on: https://chromium-review.googlesource.com/1016690
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
7 years ago
Aaron Gable 668c1d8d1f Reland "Remove Rietveld support from presubmit"
Since no one can upload or land changes from Rietveld anymore,
PRESUBMIT and its support files no longer need to be able to
support it.

Bug: 770408
Change-Id: I4ca6391291e7b0755c78af453c3d006ad3666a17
Reviewed-on: https://chromium-review.googlesource.com/991053
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
7 years ago
Aaron Gable aa6ddc6017 Revert "Remove Rietveld support from presubmit"
This reverts commit f3eed0016e.

Reason for revert: Some PRESUBMIT checks still expect 
CheckRietveldTryJobExecution to exist.

Original change's description:
> Remove Rietveld support from presubmit
> 
> Since no one can upload or land changes from Rietveld anymore,
> PRESUBMIT and its support files no longer need to be able to
> support it.
> 
> R=​tandrii@chromium.org
> 
> Bug: 770408
> Change-Id: I749092b66fdca16d5cef77e8cefc905aa5375b50
> Reviewed-on: https://chromium-review.googlesource.com/693380
> Commit-Queue: Aaron Gable <agable@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

TBR=agable@chromium.org,tandrii@chromium.org

Change-Id: I72e29bd8a9739406f29190adbeb7eb7718ed21cd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 770408
Reviewed-on: https://chromium-review.googlesource.com/991012
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Aaron Gable 8678d32937 Disallow TBRs to OWNERS files
TBRs bypass owners checks, but are also semi-suspicious: a
contributor TBRing many changes in a row to submit code to
a directory they don't own would be seen, frowned upon, and
inquired into. However, a contributor could bypass this by
simply TBRing a single change to add themselves to an OWNERS
file, and then contributing as normal from there. This CL
removes that loophole.

This will not affect sheriffs who TBR reverts for two reasons:
first, it is rare that a chance touches both code and an
OWNERS file, and therefore it is rare that OWNERS changes
get reverted; second, quick reverts (the kind sheriffs do)
bypass PRESUBMIT entirely, and therefore also skip OWNERS
checks.

Bug: 688115
Change-Id: If2b5c9d058c62caf95389287e0bb706aef721baf
Reviewed-on: https://chromium-review.googlesource.com/982601
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
7 years ago
Aaron Gable f3eed0016e Remove Rietveld support from presubmit
Since no one can upload or land changes from Rietveld anymore,
PRESUBMIT and its support files no longer need to be able to
support it.

R=tandrii@chromium.org

Bug: 770408
Change-Id: I749092b66fdca16d5cef77e8cefc905aa5375b50
Reviewed-on: https://chromium-review.googlesource.com/693380
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Robert Iannucci 82a6480a3a [presubmit_canned_checks] Stop exporting sys.path into PYTHONPATH.
Again, sys.path shouldn't ever be exported into PYTHONPATH :)

R=eakuefner@chromium.org, nodir@chromium.org, vadimsh@chromium.org

Bug: 825290,825174
Change-Id: Ia0594da3ff25972a08fdf74ae2aef5be79cbf3af
Reviewed-on: https://chromium-review.googlesource.com/978594
Reviewed-by: Ethan Kuefner <eakuefner@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Robert Iannucci 23bd73535c Clear $VPYTHON_CLEAR_PYTHONPATH when setting $PYTHONPATH.
On buildbot (only), we don't trust PYTHONPATH, so we have set
VPYTHON_CLEAR_PYTHONPATH to make the first invocation of vpython in a
given chain of python invocations clear PYTHONPATH.

This has the unfortunate side-effect that python scripts that set
PYTHONPATH and then call into vpython (like presubmit) end up
having their PYTHONPATH modifications removed.

As a workaround (until I clean up PYTHONPATH in buildbot for real), fix
presubmit_canned_checks so that it clears VPYTHON_CLEAR_PYTHONPATH when it
adjusts PYTHONPATH.

R=charlie@chromium.org, nodir@chromium.org, vadimsh@chromium.org

Bug: 825290,825174
Change-Id: Ib5f73add1726fdf3c335d26fc0af76cfe3b747b2
Reviewed-on: https://chromium-review.googlesource.com/978632
Reviewed-by: Charlie Andrews <charliea@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Robert Iannucci 5025893cb6 [presubmit_support] Prevent depot_tools' virtualenv from leaking into other repos.
Currently in LUCI `git cl` is invoked on chromium_presubmit using vpython. This
means that it operates under the depot_tools .vpython environment (which is
blank).

Some features in presubmit_support allow invocation of python subprocesses, and
previously they would use `sys.executable` (especially on windows, but
occasionally on non-windows as well).

In non-vpython environments, this just picks up the system python and whatever
modules happen to be installed there. Some python unittests work around this on
non-windows systems by having a shebang line which explicitly invokes vpython.

This CL changes presubmit_support so that invocations of 'python', or executions
of '.py' scripts will always end up invoking vpython. In the best case, this will
pick up the invoked scripts' vpython environment. In the worst case, this will
invoke the script under an empty vpython environment (aka "stock python").

R=dpranke@chromium.org, jbudorick@chromium.org, tandrii@chromium.org, tikuta@chromium.org

Bug: 821669
Change-Id: I5d2d5dfd0364022d56833c2c8af4983553a29c7a
Reviewed-on: https://chromium-review.googlesource.com/961865
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Andrii Shyshkalov 63560ada2d Notify presubmit owners check that we use Gerrit now.
R=agable@chromium.org

Change-Id: I5300756aad893878d63154d9f1f431f41add8ef4
Reviewed-on: https://chromium-review.googlesource.com/912757
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Edward Lemur 707d70b91e Skip files owned by reviewers when quering for missing owners.
Bug: 728298
Change-Id: If813ff41b1668a2cab6c26b65e424fbe574e629c
Reviewed-on: https://chromium-review.googlesource.com/899086
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
7 years ago
Mun Yong Jang b2af9586a0 [presubmit] Do not log file content in CheckChangedLUCIConfigs
Bug: 761488
Change-Id: Ic9f7fd50ce33b129436242dd86d183fd3fe83774
Reviewed-on: https://chromium-review.googlesource.com/838080
Commit-Queue: Mun Yong Jang <myjang@google.com>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
7 years ago
Mun Yong Jang 603d01e818 [presubmit] Use GerritAccessor in CheckChangedLUCIConfigs
For tryjobs, determine the remote branch using GerritAccessor

Bug: 761488
Change-Id: Ieea6028d222af0014ec3a57c3ad7b7eb8af5ec33
Reviewed-on: https://chromium-review.googlesource.com/834995
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Mun Yong Jang cfb9a236fb [presubmit] Add logging for CheckChangedLUCIConfig
Add logging for location prefix

Bug: 761488
Change-Id: I2e742fced588111feacf94877487a6c65fffc78e
Reviewed-on: https://chromium-review.googlesource.com/833087
Commit-Queue: Mun Yong Jang <myjang@google.com>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
7 years ago
Robert Iannucci 7d47eb5495 [PRESUBMIT] Add cipd package checks for all known manifests.
This also improves the cipd manifest canned check to produce unique
names in order to debug PRESUBMIT's more easily.

Adds onto
  https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/708354

R=maruel@chromium.org, tandrii@chromium.org, vadimsh@chromium.org

Bug:
Change-Id: I9f086996998608092a4d23f5c98fbac34117a9e4
Reviewed-on: https://chromium-review.googlesource.com/811445
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Mun Yong Jang b278ddd939 [presubmit] Remove line
Bug:
Change-Id: Ife9b3eaec3031de1fa4324e345f8e30012ed618a
Reviewed-on: https://chromium-review.googlesource.com/806241
Commit-Queue: Mun Yong Jang <myjang@google.com>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
7 years ago
Mun Yong Jang 17995a9f12 [depot_tools] Remove deprecated config check in canned checks
Bug: 785114
Change-Id: Ic98995d670b22ba17ef6139ed086cb1b31c7d39c
Reviewed-on: https://chromium-review.googlesource.com/804736
Commit-Queue: Mun Yong Jang <myjang@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
7 years ago
Mun Yong Jang 00fc72856b [presubmit] Rename to CheckChangedLUCIConfigs
Bug: 785114
Change-Id: I53c3b4e54f39f4bacf8fb0bda1de4e4b0e1b280b
Reviewed-on: https://chromium-review.googlesource.com/771592
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Mun Yong Jang <myjang@google.com>
8 years ago
Mun Yong Jang acc8e3ebaa [presubmit] Extend depot tools auth to use luci context
Bug: 509672
Change-Id: Ie3cb2fa1a2276f1fe658cdf7b9ffb657d03556e8
Reviewed-on: https://chromium-review.googlesource.com/754340
Commit-Queue: Mun Yong Jang <myjang@google.com>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
8 years ago
Mun Yong Jang 7af1dc56fc [presubmit] Base64 encode for config validation
Bug: 782328
Change-Id: I5219416371cc1b3dfc1f93fee6d1067ef5a6e3d3
Reviewed-on: https://chromium-review.googlesource.com/758719
Commit-Queue: Mun Yong Jang <myjang@google.com>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
8 years ago
Mun Yong Jang 4bb7dacb8c [presubmit] Address dependent local branches
Bug: 781478
Change-Id: Id07fdca70418c5e564eab8322df51a4004acc937
Reviewed-on: https://chromium-review.googlesource.com/754379
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Mun Yong Jang <myjang@google.com>
8 years ago
Sergiy Byelozyorov eba8347018 Add CheckVPythonSpec for verifying .vpython file syntax
This check will be used in Chromium, V8 and Catapult PRESUBMIT scripts.

R=maruel@chromium.org, tandrii@chromium.org

Bug: 777893
Change-Id: I2ca1e774b89787c4d3b5f336315d145571858864
Reviewed-on: https://chromium-review.googlesource.com/738169
Commit-Queue: Sergiy Byelozyorov <sergiyb@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Daniel Jacques <dnj@chromium.org>
8 years ago
Mun Yong Jang 781e71e49f [presubmit] Add check to call validation endpoint for config files
Bug:509672
Change-Id: I74bbaa725be829c625cd617c58b3e849acb18102
Reviewed-on: https://chromium-review.googlesource.com/726847
Commit-Queue: Mun Yong Jang <myjang@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
8 years ago
Michael Achenbach 590420d5d4 Make authors-check error out instead of warn on commit
Bug: 775854
Change-Id: I6f831a2536de3cadbeaede7b78cfcf7d41f77052
Reviewed-on: https://chromium-review.googlesource.com/725328
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Andrew Grieve d3b2548e57 Fix CheckPatchFormatted() error message when using inherit-review-settings-ok
Follow-up to d86c803715. The error message
was still saying "src" rather than the repository root.

Bug: 768962
Change-Id: I781191e561db889a28acf51ee49a20d6d352b489
Reviewed-on: https://chromium-review.googlesource.com/719718
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
8 years ago
Dan Jacques 94652a3767 Add CIPD manifest PRESUBMIT.
Add CIPD manifest PRESUBMIT canned checks.

BUG=None
TEST=local

Change-Id: Ibf739147f47b4f38a2892c856cf45c5839d1c3e7
Reviewed-on: https://chromium-review.googlesource.com/707557
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Xiaoyin Liu b5807979e8 Use HTTPS links in CheckAuthorizedAuthor
For security and privacy, change http://www.chromium.org/developers/contributing-code
link to use HTTPS.

R=dpranke@chromium.org

Bug:
Change-Id: I12d0658631d7704de1b3072f6eb840814cc6bed0
Reviewed-on: https://chromium-review.googlesource.com/702034
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
8 years ago
Andrew Grieve d86c803715 Fix CheckPatchFormatted() when using inherit-review-settings-ok
Adding inherit-review-settings-ok to a subrepository causes the
PRESUBMIT.py of the parent repository to be run. In this case, the
CheckPatchFormatted() check needs to run "git cl format" with
CWD=repository root.

Bug: 768962

Change-Id: I44c642185efa78ba3a1bd752f94c3c09feff9cf1
Reviewed-on: https://chromium-review.googlesource.com/685355
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
8 years ago
Ilya Sherman e081cbe5aa [git cl format] Pass --presubmit flag when formatting from presubmit.
This allows us to skip 'git cl format' for histograms.xml, which in
turn allows us to issue a presubmit error rather than a warning when
that file is malformatted, without running the formatting code twice.
The formatter is somewhat slow for this file, so it's helpful to avoid
duplicating that work.

BUG=none
TEST=none
R=iannucci@chromium.org

Change-Id: Ia86d45c7c56a9f89db34ca7175ef686589084f85
Reviewed-on: https://chromium-review.googlesource.com/569105
Commit-Queue: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Nico Weber c833946a1f Remove const NSObject global presubmit.
I added this when we were moving from gcc to clang on OS X many years
ago.  Now that gcc has been deprecated on mac for many years, this
is safe to remove (clang errors on this pattern).

This check took 0.6s during `git cl presubmit` on a recent change of
mine, so it should speed presubmit up a bit.

Bug: none
Change-Id: Ia29b046807582e056115519fb5b34ee8a1b9ff91
Reviewed-on: https://chromium-review.googlesource.com/553238
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
8 years ago
Aaron Gable fc03e67e9a Refactor PRESUBMIT support for tags
We want PRESUBMIT to be able to equally support
BUG= tags (old style) and Git-Footer: footers
(new style). This change refactors the way that
the presubmit api gives access to those properties
so that it is easier to add support for equivalent
footers.

It also limits the scope of tags/footers that it
exposes, as code search shows no PRESUBMIT files
that take advantage of any of the more esoteric
ones.

Bug: 710327, 710803
Change-Id: I86f1d6cb2e1f0aff9653ef3fb455e0a6f47acf5d
Reviewed-on: https://chromium-review.googlesource.com/506450
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Jochen Eisinger d0573ec067 Use OldContents() for OWNERS files to do checks
BUG=141253
R=dpranke@chromium.org

Change-Id: Iacbc2f0571e725e4f2ccf5ea7878f101972289bb
Reviewed-on: https://chromium-review.googlesource.com/476610
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
8 years ago
Dave Schuyler 9b9b94c412 [presub] lstrip line limit exceptions; ignore <g and <path
Previously, the <link lines in HTML are allowed to have longer than 80 characters.
This CL adds <g and <path to the HTML lines that may have unlimited characters.
(These g and path tags are used in svg image data).
These HTML exemptions also have a trailing space. The space is intended to reduce
false-positives in matching. There are some occurrences of these tags followed by a 
\n which will not match (but the line ends there, so it's not an issue).

These new tags may be preceded by blank space so .lstrip() was added to
the test. I believe this .lstrip() should not be an issue for the other
languages and exemptions present.

Bug: None
Change-Id: Ie9c2bca0e7147033e360ddcfc6eee3b73e167228
Reviewed-on: https://chromium-review.googlesource.com/477371
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Dave Schuyler <dschuyler@chromium.org>
8 years ago
Jochen Eisinger 76f5fc6cd9 Also print comments found in files during presubmit owners suggestion
R=dpranke@chromium.org
BUG=694222

Change-Id: I5676db2283dd43378293bc9bb32f71e0a1225806
Reviewed-on: https://chromium-review.googlesource.com/471609
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
8 years ago
anatoly techtonik bdcdc59cb6 Fix pylint file list matching on Windows
Windows paths use backward slash separator, which
escapes regular expressions for white and black lists
in PRESUBMIT.py filters

See https://goo.gl/6c7aku for discussion

Bug:

Change-Id: Ia1d133c5b6cfa6cb364b1500b7b7abe583bce346
Reviewed-on: https://chromium-review.googlesource.com/461141
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
8 years ago
Dave Schuyler 6eea7c2ed8 [presubmit] HTML file exceptions on long lines
This CL is a step toward checking for long lines in HTML webui files.
Those files may have long <link ...> lines which should be exempted from
the max line length.

BUG=None

Change-Id: I6fa33c004a58ea599651ae03b814fcdefbc887a1
Reviewed-on: https://chromium-review.googlesource.com/448967
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Dave Schuyler <dschuyler@chromium.org>
8 years ago
Christopher Lam c5ba692d1e Put git cl format JS formatting behind a flag.
This CL moves JS formatting behind the --js flag for git cl format
due to issue with LayoutTests. It also adds an option to check
javascript for the presubmit canned formatting check.

BUG=567770

Change-Id: I9c080b1136f6ffef9fb1b08d3bfc97ce5b3185dc
Reviewed-on: https://chromium-review.googlesource.com/430526
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Christopher Lam <calamity@chromium.org>
8 years ago
Dirk Pranke 3c86cee33a Revert "Fix OWNERS canned check to avoid duplicate output."
This reverts commit 66c50ea1f1.

Reason for revert:
Breaks some OWNERS checks. See https://crbug.com/684270 for details.

Original change's description:
> Fix OWNERS canned check to avoid duplicate output.
>
> 1. Update PanProjectChecks() to supply source_filter to CheckOwners().
>    This prevents files under e.g. third_party/WebKit being checked both
>    by the top-level and sub-directory PRESUBMIT rules.
> 2. Fix CheckOwners() to list missing-OWNERS only for the sub-directory
>    it is invoked on, rather than the whole CL. This prevents files under
>    sub-directories with their own PRESUBMIT rule, within the same repo,
>    from causing OWNERS to be checked for files outside that directory.
>
> BUG=
>
> Reviewed-on: https://chromium-review.googlesource.com/426003

TBR=wez@chromium.org,dcheng@chromium.org
BUG=684270

Change-Id: I094818a6fa3e16fbac0d37d2596a40210611ee05
Reviewed-on: https://chromium-review.googlesource.com/431656
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Clemens Hammacher d0c226a0d3 Output missing LGTMs notification also on dry-run
On larger CLs, this can be used to see whether all needed LGTMs are
there on a dry run.

R=tandrii@chromium.org

Change-Id: I5fe4022feaca73d08ead9aed14ca270192740675
Reviewed-on: https://chromium-review.googlesource.com/426819
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: smut <smut@chromium.org>
8 years ago
Wez 66c50ea1f1 Fix OWNERS canned check to avoid duplicate output.
1. Update PanProjectChecks() to supply source_filter to CheckOwners().
   This prevents files under e.g. third_party/WebKit being checked both
   by the top-level and sub-directory PRESUBMIT rules.
2. Fix CheckOwners() to list missing-OWNERS only for the sub-directory
   it is invoked on, rather than the whole CL. This prevents files under
   sub-directories with their own PRESUBMIT rule, within the same repo,
   from causing OWNERS to be checked for files outside that directory.

BUG=

Change-Id: I9bd5677a69efe9c78b4174a917780d6688991a38
Reviewed-on: https://chromium-review.googlesource.com/426003
Commit-Queue: James Weatherall <wez@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Quinten Yearsley b2cc4a94da depot_tools: Replace pylint error numbers with symbolic names.
This affects a bunch of files, but only changes comments,
and shouldn't make any difference to behavior.

The purpose is to slightly improve readability of pylint
disable comments.

Change-Id: Ic6cd0f8de792b31d91c6125f6da2616450b30f11
Reviewed-on: https://chromium-review.googlesource.com/420412
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
8 years ago
Michael Achenbach c850b9611e Add authors check to canned presubmit checks
BUG=v8:5603

Change-Id: Ib7bbdfae070ae4c55f99041befbade942d1d3f9c
Reviewed-on: https://chromium-review.googlesource.com/416859
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
agable 0b65e732b4 Remove SVN support from PRESUBMIT
R=maruel@chromium.org
BUG=475320

Review-Url: https://codereview.chromium.org/2394043002
9 years ago