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>
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>
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>
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>
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>
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>
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>
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>
"gn format" changed to remove the --in-place argument. This updates the
instructions for formatting and fixes existing usage.
git cl format --diff never worked, it just printed the full formatted output
unconditionally. This change improves things slightly by indicating there's a
diff for a file. A proper diff can be hooked up in a later stage if somebody
so desires.
Review-Url: https://codereview.chromium.org/2220123002
Ensure consistent formatting for Mojo typemap files that define the
build rules to generate StructTraits.
BUG=620799
TEST=Tested locally, both presubmit and git cl format work as expected.
Review-Url: https://codereview.chromium.org/2074793002
Also make _RietveldOwnerAndReviewers have same semantics as before,
to resolve immediate bug until chromium checkouts of developers are
updated.
BUG=609832
R=machenbach@chromium.org
Review-Url: https://codereview.chromium.org/1955223002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300494 0039d316-1c4b-4281-b951-d872f2087c98
Reason for revert:
now it doesn't work for gerrit. Damn it.
Original issue's description:
> Implement owners check in presubmit for Gerrit.
>
> R=machenbach@chromium.org,phajdan.jr@chromium.org
> BUG=605563
>
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300350
TBR=machenbach@chromium.org,phajdan.jr@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=605563
Review-Url: https://codereview.chromium.org/1935563002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300352 0039d316-1c4b-4281-b951-d872f2087c98
It's now passed using command line flags.
This depends on https://codereview.chromium.org/1931633002,
which actually uses this command line flag.
R=sergiyb@chromium.org,phajdan.jr@chromium.org
BUG=601128
Review-Url: https://codereview.chromium.org/1929653002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300268 0039d316-1c4b-4281-b951-d872f2087c98
Also, implement skipping of CheckOwners presumbit canned check. To be used by run_presubmit recipe in build repo in
https://codereview.chromium.org/1931633002
R=sergiyb@chromium.org,phajdan.jr@chromium.org,machenbach@chromium.org
BUG=594127
Review-Url: https://codereview.chromium.org/1923623004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300262 0039d316-1c4b-4281-b951-d872f2087c98
Now that we're using real override/final and not also using
virtual on the same methods, this transitional blacklist
can go away.
R=agable, dcheng
Review URL: https://codereview.chromium.org/1564403003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298201 0039d316-1c4b-4281-b951-d872f2087c98
It's basically like C++'s #include but in JS.
Why write 1 language when you can write 2?!
R=maruel@chromium.org
BUG=540977
Review URL: https://codereview.chromium.org/1394563003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297065 0039d316-1c4b-4281-b951-d872f2087c98
* make RunTest's multiprocessing.Pool in the constructor of InputApi
to avoid getting tripped up by chdir manipulation.
* Don't do the split cyclic-import check when the invoker of the
Pylint presubmit checks explicitly sends cyclic import check
parameters via extra_args
* fix pseudobug where ownership of the files variable was unclear,
and pass all arguments on stdin (instead of mix of CLI + stdin).
* fix bug in pylint which caused it to manipulate sys.path before
spawning its subprocesses, which caused multiprocessing to fail
on windows.
* Note: This may carry a slight semantic change. Before, pylint would
add all .py files' directories to sys.path while checking any of
them. Now in parallel mode, pylint will only add the path of the
single file to sys.path. This behavior actually mirrors Python's
own behavior, so the check should be more-correct than before (and
should cut down on pylint import scanning time with very large
sys.path's).
* If someone encounters an issue with this, please note that the
GetPylint check also includes an extra_paths_list which is
expressly for this purpose.
R=dpranke@chromium.org, kbr@chromium.org, maruel@chromium.org
BUG=501012
Review URL: https://codereview.chromium.org/1208743002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295908 0039d316-1c4b-4281-b951-d872f2087c98
The CQ dry run feature was announced in https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/G5-X0_tfmok
The primary complain is that the presubmit builders fail because of OWNERS checks or because of "Missing LGTM from someone other than...".
This change skips those checks for dry runs.
BUG=chromium:477190
Review URL: https://codereview.chromium.org/1090943003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294853 0039d316-1c4b-4281-b951-d872f2087c98
Blink CL https://codereview.chromium.org/879533003/ defines own
casts to convert between bridged types. The cast helpers in base
cannot be used in Blink. Fine tune the presubmit check to allow
for those by adding a negative look behind for reinterpret_cast.
BUG=
Review URL: https://codereview.chromium.org/1034523003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294560 0039d316-1c4b-4281-b951-d872f2087c98
Thanks to tfarina for the code suggestion.
BUG=443718
Review URL: https://codereview.chromium.org/990403002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294436 0039d316-1c4b-4281-b951-d872f2087c98
If the repository has third_party/dart-sdk/ unpacked, use that to
format dart files modified in the current patch.
BUG=459376
R=maruel@chromium.org, zra@google.com
Review URL: https://codereview.chromium.org/933383002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294179 0039d316-1c4b-4281-b951-d872f2087c98
This check is specific to Chromium codebase, there's no point in having it in depot_tools.
BUG=None
R=maruel@chromium.org
Review URL: https://codereview.chromium.org/924863002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294124 0039d316-1c4b-4281-b951-d872f2087c98
Way back in r185294 I added the ability to request that, when
checking owners, the patch author *should not* count (normally it does
count). We did this in order to be able to mimic the review processes
of WebKit in the Blink repo.
However, we ended up never using this feature, so I'm finally getting
around to deleting it.
R=maruel@chromium.org
BUG=none
Review URL: https://codereview.chromium.org/851103004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293685 0039d316-1c4b-4281-b951-d872f2087c98
The idea here is that when one of the filters are cleaned up in Chromium,
they should not be filtered out, otherwise we won't catch them in
the presubmit step.
See for example -> https://codereview.chromium.org/788493002/
BUG=None
R=agable@chromium.org, dpranke@chromium.org
Review URL: https://codereview.chromium.org/779033003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293357 0039d316-1c4b-4281-b951-d872f2087c98
input_api.basename is a function, so printing it out yields:
"The <function basename at 0x7fccd3735410> directory requires..>"
Instead, use it to resolve the local presubmit path that has
requested clang formatting.
R=dpranke@chromium.org
BUG=422332
Review URL: https://codereview.chromium.org/665493002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292491 0039d316-1c4b-4281-b951-d872f2087c98