0
Commit Graph

107 Commits

Author SHA1 Message Date
Vaclav Brozek
a54c528b52 Fix another false-positive of _CheckUniquePtr
The false-positive was caused by an error in matching <...> after
unique_ptr.  The old expression essentially said:
<.*?>\(
The "?", making "*" non-greedy, was meant to prevent ".*" from
matching more than one <...> block.
But that does not work -- . would still match the '>' which ended the
first block and carry on until an '>(' was found, if necessary.

So in the concrete example:
std::unique_ptr<T> result = std::make_unique<T>(
what the presubmit check "though" was the the type parameter was
"T> result = std::make_unique<T", instead of just "T".

A better way to ensure matching just one <...> block was already used
in the sibling check pattern (null_construct_pattern) -- splitting the
(possibly nested) <...> block into the part containing <s and the part
containing >s (note that a regular expression cannot check that both
parts have a matching number of < and >).

This CL just adopted that better technique for the faulty pattern.

Also remove a temporary hack from webstore_provider.cc added to bypass
the failing check.

Bug: 733662, 827961
Change-Id: Ia70cc4333f8afc4d45b1f676ea1bc870f6a3a079
Reviewed-on: https://chromium-review.googlesource.com/998194
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548896}
2018-04-06 19:23:55 +00:00
Vaclav Brozek
c2fecf47e6 Fix swapped messages in _CheckUniquePtr
_CheckUniquePtr consistes of two checks -- one related to nullptr, one
related to make_unique. The error messages are currently swapped by
accident. This CL fixes that and adds a check for that.

It also removes some confusing "java/src" subpaths from the mock file
paths in the check. Those got in via copy&paste and are confusing,
while not relevant for what the test is testing.

Bug: 827961
Change-Id: Iaf3272cfc5fe0a641feaee861ad17fe71505800b
Reviewed-on: https://chromium-review.googlesource.com/999604
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548807}
2018-04-06 16:40:16 +00:00
Vaclav Brozek
851d9604e6 Reduce _CheckUniquePtr spam
Currently, _CheckUniquePtr PRESUBMIT check reports each failing line as
a separate error. This repeats the error explanation and thus clutters
the output necessarily.

This CL makes _CheckUniquePtr collect all occurences of the two issues
it checks for (direct use of unique_ptr constructor and replaceability
with nullptr) and group them under a separate single error, one for each
of the both types of check.

It also adds the failing line into the output, to make it easier to
understand the issue already from the presubmit logs.

This follows what is done for other checks, e.g., _CheckNoPragmaOnce).

Bug: 827961
Change-Id: Ic7d60a05b6f96da741f1401422f4a1690bb6e279
Reviewed-on: https://chromium-review.googlesource.com/990132
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548081}
2018-04-04 16:13:05 +00:00
Vaclav Brozek
95face6560 Extend presubmit _CheckUniquePtr to multiline
The presubmit check _CheckUniquePtr guards against calling
std::unique_ptr constructor directly, instead directing code authors to
use std::make_unique.

This check currently fails to match multiline expressions. While it
catches
bar = std::unique_ptr<T>(foo);
it does not catch
bar =
    std::unique_ptr<T>(foo);
nor does it catch
bar = std::unique_ptr<T>(
    foo);

This CL fixes it by extending the match pattern to catch all lines with
the substring "std::unique_ptr<T>(". (But not those with
"std::unique_ptr<T>()", which should be handled by the "nullptr-check".)

Bug: 827961
Change-Id: I376b5e9811418205e294e97de0b6b7bcbf6891d2
Reviewed-on: https://chromium-review.googlesource.com/989735
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548045}
2018-04-04 14:15:11 +00:00
Vaclav Brozek
52e18bf992 Fix _CheckUniquePtr
The PRESUBMIT test _CheckUniquePtr reported the following
false-positive:
std::unique_ptr<ParseResult> result = std::make_unique<ParseResult>();
suggesting that one uses nullptr instead.

This CL fixes that bug and also adds regression tests for this
presubmit check.

Bug: 827961
Change-Id: I60a088f6590f01c51be7e3ffc0c6d65ad9e5c329
Reviewed-on: https://chromium-review.googlesource.com/989972
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547635}
2018-04-03 07:05:24 +00:00
Vaclav Brozek
7dbc28c91f Add presubmit for Java against *ForTesting in production
For (Objective-)C++, there is
_CheckNoProductionCodeUsingTestOnlyFunctions in //PRESUBMIT.py which
can detect when a method with a ForTesting suffix is referenced in
production code.

This bug tracks adding such similar presubmit check for production
.java files, which are approximated as .java files with no "test"
or "junit" in the path and filename.

The check is a modified copy of the one for C++. It does not attempt
to share code with the C++ check, because some details are simpler for
Java (e.g., no need to consider *_for_testing as well). The check is
just a presubmit prompt, not error, because there are false positives
to be expected.

Bug: 821981
Change-Id: I3bb137197070ac696fbe0fd35d50abbfb823a8d8
Reviewed-on: https://chromium-review.googlesource.com/977581
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546063}
2018-03-27 08:35:23 +00:00
Daniel Bratell
95f59f4300 Remove references to the non-existing android_compile_mips_dbg bot
Per answers on chromium-dev@, the android_compile_mips_dbg trybot
is no more.

Bug: gerrit:8617
Change-Id: I2f23c663d2baf397f30532290300bf2946531ab9
Reviewed-on: https://chromium-review.googlesource.com/980492
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545813}
2018-03-26 16:43:01 +00:00
Vaclav Brozek
bdac817c68 Extend histogram presubmit check to Java.
Currently, _CheckUmaHistogramChanges detects use of undefined
histogram names in (Objective-)C++ files.

This CL extends that support to Java as well.

Bug: 821981
Change-Id: Ida931db191f0793927b0e957e64bf6dac699d502
Reviewed-on: https://chromium-review.googlesource.com/978163
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545678}
2018-03-24 06:30:47 +00:00
Vaclav Brozek
0e730cbd89 Improve presubmit for histogram name typos
Currently, _CheckUmaHistogramChanges detects the cases like calling
  UMA_HISTOGRAM_BOOLEAN("NonexistingHistogram.Typo", true)
when "NonexistingHistogram.Typo" is not a histogram name defined in
histograms.xml.

However, it won't detect the case when the name is after a line break:
  UMA_HISTOGRAM_BOOLEAN(
      "NonexistingHistogram.VeeeeeeeryLoooooooongName.WithSubitems",
      true)

This will be often the case once the check gets extended to Java,
where the UMA_HISTOGRAM* macros are replaced with the
RecordHistogram.record*Histogram methods, which have longer names.

Bug: 821981
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I71d01f3b7012e8a8d6c4628d67a470c57005cd56
Reviewed-on: https://chromium-review.googlesource.com/978219
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545676}
2018-03-24 06:18:17 +00:00
Vaclav Brozek
8a8e2e2058 Improve _CheckUmaHistogramChanges presubmit
The _CheckUmaHistogramChanges checks whether newly added
UMA_HISTOGRAM_* calls only use defined histogram names.

This CL removes two ways to introduce false positives:
* Unrelated macro names which contain UMA_HISTOGRAM as a continuous
  substring
* More than one string literal on the line with the histogram name.

While those cases are rare, there seems no downside to fixing them.

Bug: 821981
Change-Id: Ie1a803f562883f567d577e742ed2ed87fd0dfe66
Reviewed-on: https://chromium-review.googlesource.com/978245
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545583}
2018-03-23 22:01:06 +00:00
Vaclav Brozek
f01ed503dc Add tests for 'ForTesting' presubmit check
The root PRESUBMIT.py contains
_CheckNoProductionCodeUsingTestOnlyFunctions which checks against
including a call to a 'for testing only' method in production code.
That check has not been tested. This CL adds two tests for it.

Additionally, the CL also fixes two issues in the presubmit tests:
 * FilterSourceFile in PRESUBMIT_test_mocks.py did not match the
   production version from tools/depot_tools/presubmit_support.py: the
   production requires the filename to be in the whitelist, while the
   mock version was OK with just not being in the blacklist. The CL
   modifies the mock version to match the production.
 * The test for _CheckAndroidTestJUnitInheritance did not adhere to
   the whitelisted filename pattern (*Test.java). This CL changes the
   names of the fake files to match the pattern.

Bug: 821981
Change-Id: I65edf07ddb2ae26ad7d08ceb7cf4d51b482b5e56
Reviewed-on: https://chromium-review.googlesource.com/966605
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543783}
2018-03-16 19:38:24 +00:00
Zhiling Huang
45cabf3788 Run pydeps check only in src.
Bug: 803245
Change-Id: I645e82663991cd012ced5f19a056d08bbc2c797d
Reviewed-on: https://chromium-review.googlesource.com/952281
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Zhiling Huang <hzl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542297}
2018-03-10 00:50:03 +00:00
Daniel Bratell
8ba52722ce Add presubmit check for include guards
Missing include guards tend to break jumbo builds and makes
everyone involved sad so better to have a presubmit check for it.

There is a risk that this triggers on correct code so it includes
a way to disable it per source file. Include the string
"no-include-guard-because-multiply-included" and there won't
be any warning for that file.

By popular demand there will also be a warning if the name of
the include guard doesn't follow the coding standards, but since
mistakes are common, that check is only enabled for new files.

Bug: 814776
Change-Id: Id18b3d43288b9a064e537460d667957b355bbd33
Reviewed-on: https://chromium-review.googlesource.com/931761
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540526}
2018-03-02 16:06:14 +00:00
Sylvain Defresne
a8b73d2584 Ensure autorelease pool is drained between tests
The testing::Test fixture (used by TEST macro) does not drain the
autorelease pool after a test. PlatformTest should be used.

Add a PRESUBMIT check that neither TEST nor testing::Test is used
in iOS Objective-C++ test files. Files are assumed to be iOS if
either their base name match '\bios\b' or one of the component in
the path is 'ios'.

Expand MockInputApi to filter files in mocks of AffectedFiles and
AffectedSourceFiles function, adding missing mocked functions too.
Fix unit tests that were failing after the filtering is correctly
implemented.

Bug: none
Change-Id: I0af99b6658b8e15888dfcfb94345eb879ab9fd37
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Reviewed-on: https://chromium-review.googlesource.com/937204
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539829}
2018-02-28 15:45:54 +00:00
Miguel Casas
68bdb65068 PRESUBMIT: Skip TODO(crbug.com/ pattern for upload warning
This CL admits the TODO(crbug.com/...) format for bug
references in the code base and avoids the presubmit
warning in those cases. This pattern is pervasive and
even necessary in some folders (e.g. ios/) so, although
it isn't linkified by cs.chromium.org, it's accepted.

Change-Id: Ifb6eda7967271acf76ddfb5fa555ed60f9bce415
Reviewed-on: https://chromium-review.googlesource.com/833203
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525052}
2017-12-19 16:29:09 +00:00
Miguel Casas-Sanchez
e0d46d4d2a PRESUBMIT: add a warning for crbug links w/o https://
Our code search doesn't linkify crbug[.com] if they are
not prefixed with http[s]:// (e.g. [1]). This CL adds a
warning on upload that this is happening and suggests
prefixing https://, since it seems like we are not going
to be able to linkify them automatically in CS anytime
soon (see bug).

It looks a bit like:

** Presubmit Warnings **
Found unprefixed crbug.com URL(s), consider prepending https://
    ui/ozone/platform/drm/gpu/gbm_buffer.h:107 // TODO(mcasas): crbug.com
    ui/ozone/platform/drm/gpu/gbm_buffer.h:108 // TODO(mcasas): crbug/123

[1] https://cs.chromium.org/chromium/src/BUILD.gn?type=cs&q=crbug.com&sq=package:chromium&l=65

Bug: 762061
Change-Id: Ib58bc6b58dfa61a7bf421b0ed55184705cee767c
Reviewed-on: https://chromium-review.googlesource.com/822973
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524073}
2017-12-14 15:52:19 +00:00
Benjamin Pastene
5d3fecfef1 Remove android_compile_rel on android tryserver from mb_config.pyl.
It's the same thing as linux_android_rel_ng without the tests.
Note that there's no test-less mirror of android_n5x_swarming_rel,
which is also on the CQ.

Need to remove it here before updating buildbucket.config

TBR=phajdan.jr@chromium.org

Bug: 773872
Change-Id: I7a04f92f19752ab3f31cd2203249f485fe678c94
Reviewed-on: https://chromium-review.googlesource.com/748216
Commit-Queue: Benjamin Pastene <bpastene@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513223}
2017-11-01 19:45:16 +00:00
John Budorick
ab2fa10064 Don't write bytecode when generating pydeps files.
Bug: 767620
Change-Id: I33072a124e7b487aeb97dba2b0c57d1daf3ea980
Reviewed-on: https://chromium-review.googlesource.com/705095
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507103}
2017-10-06 16:59:49 +00:00
Yoland Yan
b92fa52719 Add Presubmit Warnings for Junit4
These presubmit warnings prevent people from adding new JUnit3 tests or
use inheritance in JUnit4 testing, it also prevent people from using
the deprecated JUnit framework.

For more on JUnit4 migration, please check
//testing/android/docs/junit4.md

Bug: 640116
Change-Id: I941b595f6fbc01ac60a2647ab0af64482596d9cc
Reviewed-on: https://chromium-review.googlesource.com/634603
Commit-Queue: Yoland Yan <yolandyan@chromium.org>
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497790}
2017-08-28 17:37:06 +00:00
Daniel Cheng
13ca61a886 Enforce that mojo manifests are covered by security reviewers.
Since mojo manifests don't have a consistent naming convention, this
simply looks for JSON files with the "interface_provider_specs" key:
there are some manifests that don't specify this, but the important
part for security review is auditing what's exposed between processes.

Bug: 695922
Change-Id: Id30dae51ecc0cbfa35650ead14ef2dfd081c23d7
Reviewed-on: https://chromium-review.googlesource.com/621707
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497410}
2017-08-25 15:11:25 +00:00
dpapad
d651231d89 ES6 Style: Add presubmit prompt to avoid const/let in potential iOS9 code.
This is in preparation of moving const/let to the "allowed" features in the
ES6 styleguide.

Bug: 671426
Change-Id: I45285d49885470cfe29aaddfe9e9ff6c2ce953a2
Reviewed-on: https://chromium-review.googlesource.com/578731
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488560}
2017-07-21 02:44:47 +00:00
thakis
550aa3df79 Stop checking include order in PRESUBMIT.py
Nowadays, clang-format checks for this already.

BUG=688155

Review-Url: https://codereview.chromium.org/2957353002
Cr-Commit-Position: refs/heads/master@{#483125}
2017-06-28 20:41:30 +00:00
rlanday
6802cf635c [Reland] Add presubmit rule banning relative header includes
This CL was reverted because it had a bug making it catch all changes to C++
files in the directories it applied to (I thought the fact that I had
successfully uploaded the CL itself verified the rule wouldn't trigger on
unrelated changes...but PRESUBMIT.py is not a C++ file). I have fixed the bug in
this version.

Original CL:
https://codereview.chromium.org/2900173003

Revert:
https://codereview.chromium.org/2897383002

Original description:

Relative header includes (#include path containing "../") can be used to cheat
the dependency system because they're not checked properly. This CL adds a
presubmit rule to catch these.

This rules applies to third_party/WebKit, but not anywhere else in third_party/.
There's one currently existing file I know of that would fail this rule:
ppapi/lib/gl/include/GLES2/gl2.h

I did not change this file when cleaning up the other headers since it appears
to be code imported from a third-party repo. I guess whoever updates this file
will have to bypass the rule.

BUG=724264

Review-Url: https://codereview.chromium.org/2900253003
Cr-Commit-Position: refs/heads/master@{#475587}
2017-05-30 17:48:36 +00:00
dbeam
68f25648e1 Closure: remove older, original GYP compilation system
R=dpranke@chromium.org,sadrul@chromium.org,fukino@chromium.org
BUG=585553
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2887253006
Cr-Commit-Position: refs/heads/master@{#473381}
2017-05-19 23:17:48 +00:00
manzagop
85e629e964 Update stability report dumper so it handles non-postmortem minidumps
BUG=718437

Review-Url: https://codereview.chromium.org/2866163002
Cr-Commit-Position: refs/heads/master@{#470428}
2017-05-09 22:11:48 +00:00
Daniel Cheng
4dcdb6bbf3 Don't require DEPS OWNERS when moving lines around in a DEPS file.
As a bonus, less regex than before and also correctly handles the
'!' prefix in DEPS files now.

Bug: 702851
Change-Id: Ic086cf0984bd96ba429dfdcac7dcce53616eab2d
Reviewed-on: https://chromium-review.googlesource.com/476026
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#464648}
2017-04-14 01:29:30 +00:00
sammc
be5ca3ea5d Revert of Don't require DEPS OWNERS when moving lines around in a DEPS file. (patchset id:40001 of https://codereview.chromium.org/2768063004/ )
Reason for revert:
Breaks presubmit when adding DEPS files: https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Ftryserver.chromium.linux%2Fchromium_presubmit%2F400708%2F%2B%2Frecipes%2Fsteps%2Fpresubmit%2F0%2Fstdout

Original issue's description:
> Don't require DEPS OWNERS when moving lines around in a DEPS file.
>
> As a bonus, less regex than before and also correctly handles the
> '!' prefix in DEPS files now.
>
> BUG=702851
> R=dpranke@chromium.org
>
> Review-Url: https://codereview.chromium.org/2768063004
> Cr-Commit-Position: refs/heads/master@{#461266}
> Committed: da9479f3d2

TBR=dpranke@chromium.org,dcheng@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=702851

Review-Url: https://codereview.chromium.org/2792853002
Cr-Commit-Position: refs/heads/master@{#461358}
2017-04-03 01:48:36 +00:00
dcheng
da9479f3d2 Don't require DEPS OWNERS when moving lines around in a DEPS file.
As a bonus, less regex than before and also correctly handles the
'!' prefix in DEPS files now.

BUG=702851
R=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2768063004
Cr-Commit-Position: refs/heads/master@{#461266}
2017-03-31 23:09:37 +00:00
ksakamoto
b89c432045 Revert of Don't require DEPS OWNERS when moving lines around in a DEPS file. (patchset id:20001 of https://codereview.chromium.org/2759593003/ )
Reason for revert:
Broke DEPS auto rollers.
https://bugs.chromium.org/p/chromium/issues/detail?id=704405

Original issue's description:
> Don't require DEPS OWNERS when moving lines around in a DEPS file.
>
> As a bonus, less regex than before and also correctly handles the
> '!' prefix in DEPS files now.
>
> BUG=702851
>
> Review-Url: https://codereview.chromium.org/2759593003
> Cr-Commit-Position: refs/heads/master@{#458928}
> Committed: 63dd720c98

TBR=dpranke@chromium.org,dcheng@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=702851

Review-Url: https://codereview.chromium.org/2772693002
Cr-Commit-Position: refs/heads/master@{#459004}
2017-03-23 04:39:10 +00:00
dcheng
63dd720c98 Don't require DEPS OWNERS when moving lines around in a DEPS file.
As a bonus, less regex than before and also correctly handles the
'!' prefix in DEPS files now.

BUG=702851

Review-Url: https://codereview.chromium.org/2759593003
Cr-Commit-Position: refs/heads/master@{#458928}
2017-03-22 23:26:11 +00:00
estade
e17314a0ee Add presubmit check for Google support URL format.
See bug for details. tl;dr: we should not use direct links like
support.google.com/chrome/answer/123456

For now this is an ignoreable upload-only prompt.

BUG=679462

Review-Url: https://codereview.chromium.org/2627023003
Cr-Commit-Position: refs/heads/master@{#443255}
2017-01-12 16:22:16 +00:00
yolandyan
4500147d14 Replace deprecated Android java test annotations
Previous SmallTest, MediumTest, and LargeTest annotations have been
deprecated since level 24, since our test runner only uses these
annotations' names, instead of package names, to identify tests,
We can first replace these annotations

BUG=673824, 640116
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester
TBR=bengr@chromium.org,boliu@chromium.org,joedow@chromium.org, mariakhomenko@chromium.org,maxbogue@chromium.org, mikecase@chromium.org, msarda@chromium.org,nyquist@chromium.org,sgurun@chromium.org,tedchoc@chromium.org, xunjieli@chromium.org,yzshen@chromium.org,phajdan.jr@chromium.org,timvolodine@chromium.org

Review-Url: https://codereview.chromium.org/2583933003
Cr-Commit-Position: refs/heads/master@{#440211}
2016-12-21 21:16:27 +00:00
dbeam
1ec68ac2a3 ES6 Style: add presubmit prompt about => in code that might run on iOS9
An action item from this ES6 proposal:
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/iJrC4PVSfoU

R=dpranke@chromium.org
BUG=671426

Review-Url: https://codereview.chromium.org/2576253002
Cr-Commit-Position: refs/heads/master@{#438754}
2016-12-15 05:25:06 +00:00
jbriance
2c51e821a6 Presubmit: Skip third_party for fwd decl warning
Skip presubmit warning when the introduced useless forward
declaration is made in third_party (with the exception of
blink). Take the opportunity to fix one test and style.

BUG=662195
TEST=PRESUBMIT_test.py ForwardDeclarationTest

Review-Url: https://codereview.chromium.org/2568473002
Cr-Commit-Position: refs/heads/master@{#437833}
2016-12-12 08:27:18 +00:00
jbriance
9e12f16d49 Presubmit: Warn about useless forward declarations
Checks that added or removed lines in affected header files
do not lead to new useless class or struct forward declaration.

BUG=662195
TEST=PRESUBMIT_test.py ForwardDeclarationTest

Review-Url: https://codereview.chromium.org/2532583002
Cr-Commit-Position: refs/heads/master@{#434449}
2016-11-25 07:59:45 +00:00
dcheng
10912d9e7c Revert of Presubmit: Warn about useless forward declarations (patchset id:1 of https://codereview.chromium.org/2525263002/ )
Reason for revert:
Warning too aggressively + doesn't work with deleted files.

Original issue's description:
> Presubmit: Warn about useless forward declarations
>
> Checks that affected header files do not contain useless class
> or struct forward declaration.
>
> BUG=662195
> TEST=PRESUBMIT_test.py ForwardDeclarationTest
>
> Committed: https://crrev.com/1ae91afd6ab12165d8bd7981b9984fe7aec8d3d2
> Cr-Commit-Position: refs/heads/master@{#434329}

TBR=jochen@chromium.org,dpranke@google.com,phajdan.jr@chromium.org,asvitkine@chromium.org,jbriance@cisco.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=662195

Review-Url: https://codereview.chromium.org/2532563002
Cr-Commit-Position: refs/heads/master@{#434343}
2016-11-24 16:38:23 +00:00
jbriance
1ae91afd6a Presubmit: Warn about useless forward declarations
Checks that affected header files do not contain useless class
or struct forward declaration.

BUG=662195
TEST=PRESUBMIT_test.py ForwardDeclarationTest

Review-Url: https://codereview.chromium.org/2525263002
Cr-Commit-Position: refs/heads/master@{#434329}
2016-11-24 15:34:40 +00:00
benwells
e02ee8681a Remove references to DrMemory from chromium repo.
This removes references to DrMemory for MB, GN and buildbot, and also
removes references to redundant DrMemory bots and DrMemory targets.

BUG=655521, 644217

Review-Url: https://codereview.chromium.org/2455463002
Cr-Commit-Position: refs/heads/master@{#430388}
2016-11-07 22:21:37 +00:00
pastarmovj
89f7ee10f0 Adds new logging type SYSLOG which logs to the system log.
On Windows this type logs to the Event Log and on POSIX systems it logs to the messages log (or its equvalent).

As a side effect of adding the presubmit check for it this
CL fixes running the presumbit checks tests on Windows.

BUG=642115

Review-Url: https://codereview.chromium.org/2296783002
Cr-Commit-Position: refs/heads/master@{#419758}
2016-09-20 14:59:43 +00:00
tandrii
e5587794fa PRESUBMIT: use "master." prefix in CQ_INCLUDE_TRYBOTS.
R=jam@chromium.org,danakj@chromium.org,kbr@chromium.org
BUG=617627

Review-Url: https://codereview.chromium.org/2148053002
Cr-Commit-Position: refs/heads/master@{#405365}
2016-07-14 00:37:51 +00:00
jbudorick
3ae7a77b04 [Android] Remove android_chromium_gn_compile_{dbg,rel} from the CQ.
BUG=610839

Review-Url: https://codereview.chromium.org/1998693002
Cr-Commit-Position: refs/heads/master@{#394963}
2016-05-20 02:37:22 +00:00
dpranke
201d0fb218 Remove stale references to the blink_presubmit bot.
R=phajdan.jr@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1861173002

Cr-Commit-Position: refs/heads/master@{#385567}
2016-04-06 22:21:10 +00:00
agrieve
f32bcc73df Reland of Include isolate.py in data for Android unit tests
Now unconditionally including some directory trees to capture imports that differ based on python version (at least those that have come up so far).

BUG=589318, 599692

Review URL: https://codereview.chromium.org/1846103005

Cr-Commit-Position: refs/heads/master@{#384907}
2016-04-04 14:59:51 +00:00
sergiyb
b4f617bded Revert of Include isolate.py in data for Android unit tests (patchset id:200001 of https://codereview.chromium.org/1840113002/ )
Reason for revert:
Speculative revert, see http://crbug.com/599692.

Original issue's description:
> Reland of Include isolate.py in data for Android unit tests
>
> Now with check disabled for non-android checkouts.
>
> This is required for any test that uses an .isolate to push files to the
> device (e.g. base_unittests).
>
> BUG=589318
>
> Committed: https://crrev.com/4b6084284590609810fb2c0653fd1b42c6fcaddb
> Cr-Commit-Position: refs/heads/master@{#384039}

TBR=jochen@chromium.org,jbudorick@chromium.org,agrieve@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=589318, 599692

Review URL: https://codereview.chromium.org/1851773002

Cr-Commit-Position: refs/heads/master@{#384557}
2016-04-01 12:03:44 +00:00
benwells
cfc1fc6e71 Remove references to mac valgrind bot.
The bot has been removed from the memory FYI waterfall.

BUG=593920

Review URL: https://codereview.chromium.org/1844493002

Cr-Commit-Position: refs/heads/master@{#384106}
2016-03-30 22:04:52 +00:00
agrieve
4b60842845 Reland of Include isolate.py in data for Android unit tests
Now with check disabled for non-android checkouts.

This is required for any test that uses an .isolate to push files to the
device (e.g. base_unittests).

BUG=589318

Review URL: https://codereview.chromium.org/1840113002

Cr-Commit-Position: refs/heads/master@{#384039}
2016-03-30 18:52:08 +00:00
agrieve
e33676c3fa Revert of Include isolate.py in data for Android unit tests (patchset id:80001 of https://codereview.chromium.org/1784373002/ )
Reason for revert:
PRESUBMIT isn't working for non-android checkouts, as shown by:

https://codereview.chromium.org/1840913002/diff/1/build/android/test_runner.pydeps#oldcode138

Original issue's description:
> Include isolate.py in data for Android unit tests
>
> This is required for any test that uses an .isolate to push files to the
> device (e.g. base_unittests).
>
> BUG=589318
>
> Committed: https://crrev.com/9e299ea6bbf87415d64d9d84003162d71304ccb9
> Cr-Commit-Position: refs/heads/master@{#383127}

TBR=jochen@chromium.org,jbudorick@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=589318

Review URL: https://codereview.chromium.org/1839103002

Cr-Commit-Position: refs/heads/master@{#383733}
2016-03-29 15:48:24 +00:00
agrieve
9e299ea6bb Include isolate.py in data for Android unit tests
This is required for any test that uses an .isolate to push files to the
device (e.g. base_unittests).

BUG=589318

Review URL: https://codereview.chromium.org/1784373002

Cr-Commit-Position: refs/heads/master@{#383127}
2016-03-24 20:08:06 +00:00
dbeam
37e8e740cb Add presubmit warning about deprecated compiled_resources.gyp
Just use v2 instead ;) (compiled_resources2.gyp)

R=maruel@chromium.org,cpu@chromium.org
BUG=585553

Review URL: https://codereview.chromium.org/1686663002

Cr-Commit-Position: refs/heads/master@{#374762}
2016-02-10 23:00:46 +00:00
danakj
6ba4c1e61a Rename MOVE_ONLY_TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03
This renames the macro to be more standard and express its intent and
relationship to DISALLOW_COPY_AND_ASSIGN. It renames the macro to
DISALLOW_COPY_AND_ASSIGN_WITH_MOVE_FOR_BIND, as it does what
the old DISALLOW_COPY_AND_ASSIGN does, but also whitelists the type
for Bind/Callback to try move it.

R=Nico
TBR=sky
BUG=561749

Review URL: https://codereview.chromium.org/1501793003

Cr-Commit-Position: refs/heads/master@{#363712}
2015-12-08 02:31:53 +00:00