0
Commit Graph

178 Commits

Author SHA1 Message Date
Rainhard Findling
d8d0437b1f Require translation screenshot if none exists or message content changed
* The current translation screenshot presubmit check flags messages
  which got modified but for which no new translation screenshot
  got uploaded. It thereby also flags messages that got modified, but of
  which the message content itself did not change. This is the case, for
  example, if only the message description for translators got changed.
* This CL restricts the translation screenshot presubmit flagging
  modified messages. It will trigger 1) if the message did not have a
  screenshot at all so far, or 2) if the message content itself changed.
  Only changing the non-visible part of a message that already has a
  translation screenshot does not trigger it anymore.

Bug: 1103844
Change-Id: I254ce2a7267a7d2308b606b16d080c74188d582b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2328669
Commit-Queue: Rainhard Findling <rainhard@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797648}
2020-08-13 13:30:09 +00:00
Saagar Sanghavi
fceeaae5d5 Rewrote PRESUBMIT.py with new approach.
Re-design of the CL (crrev.com/c/2341362) to enable presubmit_support
to time/ResultDB wrap each individual lower-level check in PRESUBMIT.py.
The approach taken here is to have the PRESUBMIT_VERSION = 2.0.0 in here
so that presubmit_support is aware of the new version of PRESUBMIT.py,
then check input_api.version in CheckChangeOnCommit/Upload to ensure
that presubmit_support itself is the new version.

The associated changes to depot_tools (crrev.com/c/2349979) must be
landed in order for this to work.

Change-Id: I91d09337dd77a74540ac4a01017275bcaaa67cde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2350234
Commit-Queue: Saagar Sanghavi <saagarsanghavi@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#797291}
2020-08-12 16:40:36 +00:00
Dirk Pranke
b316a14ad7 Revert "Rewrote PRESUBMIT.py"
This reverts commit 065782712e.

Reason for revert: Getting reports of the version check not working from various users; see crbug.com/1115140

Original change's description:
> Rewrote PRESUBMIT.py
> 
> Rewrote PRESUBMIT.py (and associated tests) to new format. Runs
> REQUIRE_PRESUBMIT_VERSION at the top so that depot_tools can be
> made aware of the change and can time/rdb wrap each of the Check...
> functions separately, while also ensuring that they have the new
> version of depot_tools.
> 
> Requires the newer version of presubmit_support.py in depot_tools,
> which is described in crrev.com/c/2341828
> 
> Change-Id: I102e8c75834aff1eccdf4a27ffe6f0953b76ee57
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2341362
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Commit-Queue: Saagar Sanghavi <saagarsanghavi@google.com>
> Cr-Commit-Position: refs/heads/master@{#796595}

TBR=dpranke@google.com,estaab@chromium.org,saagarsanghavi@google.com

Change-Id: Ib3295d141e997fc6792c381fea10e8892204bcdb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2349428
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#796867}
2020-08-11 17:12:57 +00:00
Saagar Sanghavi
065782712e Rewrote PRESUBMIT.py
Rewrote PRESUBMIT.py (and associated tests) to new format. Runs
REQUIRE_PRESUBMIT_VERSION at the top so that depot_tools can be
made aware of the change and can time/rdb wrap each of the Check...
functions separately, while also ensuring that they have the new
version of depot_tools.

Requires the newer version of presubmit_support.py in depot_tools,
which is described in crrev.com/c/2341828

Change-Id: I102e8c75834aff1eccdf4a27ffe6f0953b76ee57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2341362
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Saagar Sanghavi <saagarsanghavi@google.com>
Cr-Commit-Position: refs/heads/master@{#796595}
2020-08-10 22:53:50 +00:00
Avi Drissman
32967a9ec9 Engage the presubmit warning for OS_MACOSX
OS_MACOSX will still work for code already in the tree, but warn
to prevent new instances from landing.

Bug: 1105907
Change-Id: Ia811e352ab7ec688bad5e8e7b31868777dd75c10
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2328330
Commit-Queue: Avi Drissman <avi@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#793021}
2020-07-30 04:10:32 +00:00
Avi Drissman
34594e90b3 Introduce OS_MAC
In the spirit of macOS Big Sur, which is labeled as macOS 11.0,
introduce OS_MAC and OS_APPLE. OS_MACOSX implicitly included OS_IOS,
which was confusing, so OS_APPLE is the new replacement for "macOS +
iOS" and OS_MAC is the new replacement for "just macOS, not iOS".

Bug: 1105907
Change-Id: I0f24ff5a74f07eaf2fe7b7fa17bdef7e82a514fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299189
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791353}
2020-07-25 05:35:44 +00:00
Mustafa Emre Acer
d3ca8be8cf Rename is_accessibility attribute in UI strings
This is a follow up to https://crrev.com/c/2274667

This attribute was recently introduced so that developers wouldn't
get presubmit errors for accessibility labels that are not shown in the
UI. However, screen readers do actually display most accessibility
labels, so having screenshots for these strings are still useful. Still,
there is a small subset of accessibility labels that are never
displayed. This CL renames the existing attribute to make the intention
of the carveout clear.

Bug: 1094077
Change-Id: I4c171d29fea0aac611cb07759422bd5c25688017
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2285076
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786025}
2020-07-07 22:35:34 +00:00
Gyuyoung Kim
4952ba6aef Migrate StrongBinding to new Mojo type
This CL converts remaining StrongBinding's uses to
MakeSelfOwnedReceiver. Besides that this CL removes
all unnecessary strong_binding.h includes.

Additionally, PRESUMIT scripts start warning the use of
StrongBinding.

Bug: 955171
Change-Id: I3336fc31b7c7f390c00d4dfdd87dca404cce5e1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2281790
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#785614}
2020-07-07 07:33:44 +00:00
Mustafa Emre Acer
c6ed268772 Presubmit: Change translation screenshot warnings to errors
Presubmit currently warns when a UI string is missing translation
screenshots. We'll now require all strings to have associated
screenshots. This CL changes the warnings to errors.

Bug: 1087641
Change-Id: I0968dee994e304bd9c7c59bab56d5f1b0325d5d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2283261
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#785613}
2020-07-07 07:24:00 +00:00
Mustafa Emre Acer
ed1a489619 Skip screenshot checks for strings marked with is_accessibility=true
We require translation screenshots for strings in grd and grdp files.
It's been noted that some of these strings are accessibility labels, and
they aren't displayed in Chrome UI.

This CL introduces a new tag to mark strings that are used as
accessibility labels (is_accessibility=true). If a UI message has this
tag, it'll be excluded from translation screenshot checks in the
presubmit.

Bug: 1094077
Change-Id: I204d068264ff0d0305d1d8afd48de516f9a26ac1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2274667
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#784078}
2020-06-30 19:15:39 +00:00
Mohamed Heikal
7cd4d831d5 Warn if an android pydeps might be stale in a non-android checkout
We cannot check if android specific pydeps files are stale in a
non-android checkout because some imported libraries will be missing.
However, we can output a warning letting the developer know so as to
reduce the chances of CLs landing that make android pydeps stale.

Change-Id: Icd1047d4350f6d3cb439d09ea2ba958b51afe61f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2240260
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#778857}
2020-06-16 16:49:40 +00:00
Alex Gough
bc964dd7fa Removes WithSandboxType from service process host options.
All services now receive custom sandboxes from a service_sandbox_type.h
specialization of GetServiceSandboxType, or use kUtility, so this
API can be removed.

The presubmit check for WithSandboxType has been modified to spot
new or changed instances of GetServiceSandboxType.

Bug: 1065087
Change-Id: I7199fe160292afa5d1b5e35dd7dd4bee5fb82e1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2219392
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#778366}
2020-06-15 17:52:37 +00:00
Ken Rockot
ad7901f94a Fix mojom backcompat presubmit with deleted files
The presubmit step for checking mojom backward-compatibility does not
work properly when a mojom file is deleted. This is due to incorrect use
of the presubmit input API, effectively not providing the checking tool
with any information about deleted files.

This fixes that.

Fixed: 1091407
Change-Id: I4cd3d7bb5ce07a7d75e8bac99319c75ca6d28118
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2231266
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#775248}
2020-06-04 20:17:09 +00:00
Mustafa Emre Acer
e4b349cf47 Ignore non-translateable strings from translation screenshot presubmit
This CL ignores messages marked as `translateable="false"` from the
_CheckStrings presubmit.

Bug: 1085611
Change-Id: I0ba74ef04a3b78ae39107989da34d3df7c1ba922
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2226070
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774860}
2020-06-03 23:42:48 +00:00
Ken Rockot
c31f483dfd Introduce presubmit check for stable mojom changes
Mojom types marked [Stable] must preserve backward-compatibility over
time. This presubmit tool checks for unsafe changes to any such types.

Fixed: 1070663
Change-Id: Ie1d3ca30d608dd95e256c782593c9df910512e96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2219020
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773276}
2020-05-29 18:58:51 +00:00
Akihiro Ota
08108e5425 Presubmit: Check the commit description for AX-Relnotes field
In addition to checking the commit footer, we should also check the
commit description for the AX-Relnotes field.

Bug: N/A

Change-Id: Ie9839bbf02b84d97ace0c60e8b972d048bbe7eb6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2198931
Commit-Queue: Akihiro Ota <akihiroota@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Chris Hall <chrishall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#770600}
2020-05-20 15:30:53 +00:00
Rainhard Findling
fc31844c5b Add an ICU syntax validity check to presubmit checks
* This CL introduces a Chromium top-level string ICU syntax presubmit
  check. It validates the ICU syntax of any added or modified strings
  in .grd or .grdp files, and points out any found syntax errors. This
  is done to prevent subsequent, time consuming translation extraction
  blockages caused by ICU syntax errors (see crbug.com/1061546 for an
  example).
* This CL integrates both the string ICU syntax an the string screenshot
  presubmit check into a single check for execution time purposes. Both
  check need to loop through all added and modified strings, hence
  combining both in one check minimizes the execution time overhead.
* More details: go/chromium-string-icu-syntax-check

Bug: 1081730
Change-Id: I9bde972e3e382362cab07f64af8e5d93dccd26f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2199256
Commit-Queue: Rainhard Findling <rainhard@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#769216}
2020-05-15 09:58:26 +00:00
Robert Sesek
2c90533ba5 Add PRESUBMIT to enforce OWNERS review of security-critical changes.
Historically SECURITY_OWNERS enforcement has been done by filename
matching. But increasingly security configuration is done in ad-hoc
spots that do not conform to per-file organization. This adds a new
presubmit check that matches CL contents against patterns to determine
if it has security-critical changes, and requires OWNERS enforcement
if so.

The first and only pattern matched so far is the WithSandboxType()
function used to configure the sandbox policy for utility processes
launched via ServiceProcessHost.

Bug: 1077000
Change-Id: Ib4a6b7aa9e83306a106086141a99197f641ea539
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2180446
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#766202}
2020-05-06 23:17:13 +00:00
Chris Hall
59f8d0c7c6 Add presubmit check for relnotes field in accessibility changes.
R=akihiroota,dmazzoni,jam,dpranke

Change-Id: I37d5035967941da1d2e3d671426133668b87f0f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2162427
Commit-Queue: Chris Hall <chrishall@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Akihiro Ota <akihiroota@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764594}
2020-05-01 07:31:19 +00:00
Wez
17c6696d5a [fuchsia] Pre-submit check for correct FIDL, CMX and CML OWNERS.
Require that //fuchsia/SECURITY_OWNERS own all:
- Fuchsia IDL (aka FIDL) files defining IPC protocols with other Fuchsia
  components.
- Component manifest definitions (CMX & CML), which specify the services
  and component framework features that each component relies upon.

PRESUBMIT.py's _CheckSecurityOwners() function is modified to process the
results of both cross-platform and Fuchsia-specific IPC ownership checks.

Bug: 1053551
Change-Id: I3755297c1be395040e0553f22a87cf95526658ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2135614
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Auto-Submit: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#763825}
2020-04-29 15:26:03 +00:00
Daniel Cheng
76f49cc716 Remove PRESUBMIT.py check to scan for JSON manifests for Mojo.
Mojo manifests have been completely migrated from JSON to C++.

Bug: 895616
Change-Id: Ic32a2869ba01ae18735dc3502a8385bfd67bf7f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2154539
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760768}
2020-04-21 01:48:26 +00:00
Tomasz Śniatowski
3ae2f10e43 Check more cases in android log tag PRESUBMIT
Relax a regex to catch Log.e("log message", ..) as a bad/missing TAG
instead of silently accepting it. Also add a rough TAG-change detection
regex to try and make changes that only touch a TAG also run the checks.
Adjust tests to match.

Bug: 1063573
Change-Id: I6a5c302d581aa76ebfc86a286e6048412641f4de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2113572
Auto-Submit: Tomasz Śniatowski <tsniatowski@vewd.com>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752441}
2020-03-23 15:35:55 +00:00
Allen Bauer
53b43fb19e Add PRESUBMIT check for set_owned_by_client().
Bug: 1044687
Change-Id: I698ba7bba434d30c6f2ed0928cc9c2059eb6a586
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2097834
Reviewed-by: Robert Liao <robliao@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749738}
2020-03-12 17:21:47 +00:00
Mustafa Emre Acer
51f2f743cc Add presubmit for translation expectations
Background (taken from crbug/583195):
translation_expectations.pyl contains the list of translatable grd
files and the languages they're expected to be translated into. It's
used internally during the translation process to determine which grd
files should be copied to google3 for translation, etc. Each
repository with grd files (desktop, Android, iOS) has a
translation_expectations.pyl file, which must list every grd file that
contains strings.

translation_expectations.pyl isn't used at all when building (neither
locally nor on the bots), so there's no indication to developers if
translation_expectations.pyl needs to be updated (e.g. because a grd
file was added) or is malformed. Instead, an error will occur much
later when the weekly translation run happens, causing unnecessary
back-and-forth between TPMs and developers and introducing delays.
This happens every few weeks.

This CL adds a presubmit that checks if the contents of the
translation_expectations.pyl matches the list of .grd files in the
repository. The presubmit only runs if a .grd or .grdp file is
modified, so in most cases it's a no-op. It lists the names of missing
and unlisted files in the warning.

Bug: 583195
Change-Id: I5013311dac5db1f0578f59022832dc8e33c1ee37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1464078
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: anthonyvd <anthonyvd@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748339}
2020-03-09 19:41:12 +00:00
Oksana Zhuravlova
c8222d2c5a [mojo] Add presubmit warning for renderer-side GetInterfaceProvider
This change adds a warning for new uses of GetInterfaceProvider() and
suggests using GetBrowserInterfaceBroker() instead.

Bug: 718652
Change-Id: I2e99ba36a8cdb198200967d27a64931a32adcdc7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1967759
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726462}
2019-12-19 19:21:16 +00:00
Mario Sanchez Prada
aab9138db3 Remove remaining old mojo types in //content and update PRESUBMIT script
The three migrations proposed in this CL are the only instances left
inside //content after the massive migration to the new types, so let's
migrate these ones too and then update the PRESUBMIT script so that any
attempt to re-introduce old types in this part of the code will raise
an error, instead of a warning.

TBR=kenrb@chromium.org

Bug: 955171
Change-Id: Ib006c869576d122289781d065629db957cd9f347
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1972847
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#726303}
2019-12-19 08:57:09 +00:00
Mario Sanchez Prada
cec9cef719 [mojo] Update presubmit checks to prevent introducing old Mojo types
Following the work started in CL1796371, this change changes the logic
of the PRESUBMIT.py script in order to raise ERRORS from now on when
deprecated mojo types are introduced in Blink, and raise WARNINGS when
those old types are introduced everywhere else but //components/arc,
which hasn't been migrated yet (see crrev.com/c/1868870).

We didn't do this before to prevent too many "false positives" when
moving code around, but since all of Blink has been migrated now and
nearly everything outside of Blink (but //components/arc) is nearly
finished, this seems like a good moment to flip the switch.

See the "Mojo Bindings Conversion CheatSheet" for more information:
https://docs.google.com/document/d/1Jwfbzbe8ozaoilhqj5mAPYbYGpgZCen_XAAAdwmyP1E

Bug: 955171
Change-Id: I1f7b62ff6841935a43c462dc266d3f3aa632aa80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1961908
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Cr-Commit-Position: refs/heads/master@{#724971}
2019-12-15 11:54:57 +00:00
meacer
ff8a9b6334 Reland "Support grdp files in translation screenshot presubmit"
This is a reland of 2308d0744f

Original change's description:
> Support grdp files in translation screenshot presubmit
>
> Translation screenshots project requires Chrome devs to upload UI
> screenshots along with string changes in .grd and .grdp files. These
> are XML files containing all user visible strings in Chrome.
>
> Translation screenshots has a presubmit checks that extracts the
> list of modified strings, looks for image files associated with these
> strings and warns the developer to add them if they are missing.
>
> This presubmit parses .grds to extract the list of modified strings but
> it skips <part> tags which are used to reference .grdp files. As a
> result, the presubmit currently ignores string changes in .grdp files.
> .grdp files contain the majority of UI strings in Chrome, so the lack of
> presubmit checks for them results in low translation screenshot coverage.
>
> This CL changes how .grdp files are loaded in the presubmit: Previously,
> they were written in a temporary directory alongside a fake .grd file
> that referenced the loaded .grdp file. The code loaded the fake .grd file
> which resulted in loading the strings in the actual .grdp file. However,
> test mocks override all os.path methods which in turn breaks temporary
> directory creation. As a result, it was not possible to properly test
> the .grdp loading code, so we skipped <part> tags as a workaround.
>
> The new loading code writes a temporary copy of the .grdp file and wraps
> its contents with proper tags so that it can be loaded as a .grd file
> instead. This avoids the need to create a temporary directory and is
> fully testable.
>
> The end result is that Translation Screenshots presubmit will now ask
> Chrome devs to upload screenshots for changes in .grdp files. This should
> significantly increase the coverage of strings with translation screenshots,
> leading to better quality in string localizations.
>
> Bug: 924652
> Change-Id: Iae7933e8147cefdabc15ef21d2b6daa43d5002bc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1875554
> Reviewed-by: anthonyvd <anthonyvd@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#714550}

Bug: 924652
Change-Id: Ide7559496fb006724cbed9daa67840c1883a55d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1912835
Reviewed-by: anthonyvd <anthonyvd@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#716224}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1953701
Cr-Commit-Position: refs/heads/master@{#723468}
2019-12-10 19:43:58 +00:00
Samuel Huang
0db2ea20d2 [Tests] Fix typo 'Tets'.
DISABLED_OneShotAccessibilityTreeSearchTets.* were added on 2019-10-16
in:

https://chromium-review.googlesource.com/c/chromium/src/+/1854682

and have been failing android-asan bot (Nexus 5) ever since. This CL
fixes the typo 'Tets' to 'Test' in speculative hope that it will fix
the problem.

Also fix same typo (but non-suffix) in
CheckAddedDepsHaveTetsApprovalsTest
=> CheckAddedDepsHaveTestApprovalsTest for good measure.

Change-Id: If3205f5b336d335e6397becec001c05f70ce6b9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1956009
Reviewed-by: Samuel Huang <huangs@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722964}
2019-12-09 16:42:47 +00:00
Mustafa Emre Acer
ad8fb08e9e Revert "Reland "Support grdp files in translation screenshot presubmit""
This reverts commit 12e7fee2b9.

Reason for revert: crbug/1025982 

Original change's description:
> Reland "Support grdp files in translation screenshot presubmit"
> 
> This is a reland of 2308d0744f
> 
> Original change's description:
> > Support grdp files in translation screenshot presubmit
> > 
> > Translation screenshots project requires Chrome devs to upload UI
> > screenshots along with string changes in .grd and .grdp files. These
> > are XML files containing all user visible strings in Chrome.
> > 
> > Translation screenshots has a presubmit checks that extracts the
> > list of modified strings, looks for image files associated with these
> > strings and warns the developer to add them if they are missing.
> > 
> > This presubmit parses .grds to extract the list of modified strings but
> > it skips <part> tags which are used to reference .grdp files. As a
> > result, the presubmit currently ignores string changes in .grdp files.
> > .grdp files contain the majority of UI strings in Chrome, so the lack of
> > presubmit checks for them results in low translation screenshot coverage.
> > 
> > This CL changes how .grdp files are loaded in the presubmit: Previously,
> > they were written in a temporary directory alongside a fake .grd file
> > that referenced the loaded .grdp file. The code loaded the fake .grd file
> > which resulted in loading the strings in the actual .grdp file. However,
> > test mocks override all os.path methods which in turn breaks temporary
> > directory creation. As a result, it was not possible to properly test
> > the .grdp loading code, so we skipped <part> tags as a workaround.
> > 
> > The new loading code writes a temporary copy of the .grdp file and wraps
> > its contents with proper tags so that it can be loaded as a .grd file
> > instead. This avoids the need to create a temporary directory and is
> > fully testable.
> > 
> > The end result is that Translation Screenshots presubmit will now ask
> > Chrome devs to upload screenshots for changes in .grdp files. This should
> > significantly increase the coverage of strings with translation screenshots,
> > leading to better quality in string localizations.
> > 
> > Bug: 924652
> > Change-Id: Iae7933e8147cefdabc15ef21d2b6daa43d5002bc
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1875554
> > Reviewed-by: anthonyvd <anthonyvd@chromium.org>
> > Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> > Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#714550}
> 
> Bug: 924652
> Change-Id: Iaf0f68f8abdccd3bca66b4b611bf53d8337d347b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1912835
> Reviewed-by: anthonyvd <anthonyvd@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#716224}

TBR=meacer@chromium.org,anthonyvd@chromium.org,jochen@chromium.org

Change-Id: Id5265d9bffe86e3179784325eff357f9ac758967
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 924652
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1923155
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716498}
2019-11-19 04:24:21 +00:00
Mustafa Emre Acer
12e7fee2b9 Reland "Support grdp files in translation screenshot presubmit"
This is a reland of 2308d0744f

Original change's description:
> Support grdp files in translation screenshot presubmit
> 
> Translation screenshots project requires Chrome devs to upload UI
> screenshots along with string changes in .grd and .grdp files. These
> are XML files containing all user visible strings in Chrome.
> 
> Translation screenshots has a presubmit checks that extracts the
> list of modified strings, looks for image files associated with these
> strings and warns the developer to add them if they are missing.
> 
> This presubmit parses .grds to extract the list of modified strings but
> it skips <part> tags which are used to reference .grdp files. As a
> result, the presubmit currently ignores string changes in .grdp files.
> .grdp files contain the majority of UI strings in Chrome, so the lack of
> presubmit checks for them results in low translation screenshot coverage.
> 
> This CL changes how .grdp files are loaded in the presubmit: Previously,
> they were written in a temporary directory alongside a fake .grd file
> that referenced the loaded .grdp file. The code loaded the fake .grd file
> which resulted in loading the strings in the actual .grdp file. However,
> test mocks override all os.path methods which in turn breaks temporary
> directory creation. As a result, it was not possible to properly test
> the .grdp loading code, so we skipped <part> tags as a workaround.
> 
> The new loading code writes a temporary copy of the .grdp file and wraps
> its contents with proper tags so that it can be loaded as a .grd file
> instead. This avoids the need to create a temporary directory and is
> fully testable.
> 
> The end result is that Translation Screenshots presubmit will now ask
> Chrome devs to upload screenshots for changes in .grdp files. This should
> significantly increase the coverage of strings with translation screenshots,
> leading to better quality in string localizations.
> 
> Bug: 924652
> Change-Id: Iae7933e8147cefdabc15ef21d2b6daa43d5002bc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1875554
> Reviewed-by: anthonyvd <anthonyvd@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#714550}

Bug: 924652
Change-Id: Iaf0f68f8abdccd3bca66b4b611bf53d8337d347b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1912835
Reviewed-by: anthonyvd <anthonyvd@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716224}
2019-11-18 18:49:55 +00:00
Jochen Eisinger
f9fbe7b6c3 Add presubmit check for set noparent rules
Bug: 1018108
Change-Id: I5d86962e4dcdd3a95058efef86735a11a75ac8c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1908531
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716096}
2019-11-18 09:37:26 +00:00
Mustafa Emre Acer
36eaad5340 Revert "Support grdp files in translation screenshot presubmit"
This reverts commit 2308d0744f.

Reason for revert: This broke `git cl upload` with string changes.

Original change's description:
> Support grdp files in translation screenshot presubmit
> 
> Translation screenshots project requires Chrome devs to upload UI
> screenshots along with string changes in .grd and .grdp files. These
> are XML files containing all user visible strings in Chrome.
> 
> Translation screenshots has a presubmit checks that extracts the
> list of modified strings, looks for image files associated with these
> strings and warns the developer to add them if they are missing.
> 
> This presubmit parses .grds to extract the list of modified strings but
> it skips <part> tags which are used to reference .grdp files. As a
> result, the presubmit currently ignores string changes in .grdp files.
> .grdp files contain the majority of UI strings in Chrome, so the lack of
> presubmit checks for them results in low translation screenshot coverage.
> 
> This CL changes how .grdp files are loaded in the presubmit: Previously,
> they were written in a temporary directory alongside a fake .grd file
> that referenced the loaded .grdp file. The code loaded the fake .grd file
> which resulted in loading the strings in the actual .grdp file. However,
> test mocks override all os.path methods which in turn breaks temporary
> directory creation. As a result, it was not possible to properly test
> the .grdp loading code, so we skipped <part> tags as a workaround.
> 
> The new loading code writes a temporary copy of the .grdp file and wraps
> its contents with proper tags so that it can be loaded as a .grd file
> instead. This avoids the need to create a temporary directory and is
> fully testable.
> 
> The end result is that Translation Screenshots presubmit will now ask
> Chrome devs to upload screenshots for changes in .grdp files. This should
> significantly increase the coverage of strings with translation screenshots,
> leading to better quality in string localizations.
> 
> Bug: 924652
> Change-Id: Iae7933e8147cefdabc15ef21d2b6daa43d5002bc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1875554
> Reviewed-by: anthonyvd <anthonyvd@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#714550}

TBR=meacer@chromium.org,anthonyvd@chromium.org,jochen@chromium.org

Change-Id: I1a6ee198b1dd76e84bcf962cd2396f4d00c5c126
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 924652
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1913564
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714712}
2019-11-12 23:03:34 +00:00
meacer
2308d0744f Support grdp files in translation screenshot presubmit
Translation screenshots project requires Chrome devs to upload UI
screenshots along with string changes in .grd and .grdp files. These
are XML files containing all user visible strings in Chrome.

Translation screenshots has a presubmit checks that extracts the
list of modified strings, looks for image files associated with these
strings and warns the developer to add them if they are missing.

This presubmit parses .grds to extract the list of modified strings but
it skips <part> tags which are used to reference .grdp files. As a
result, the presubmit currently ignores string changes in .grdp files.
.grdp files contain the majority of UI strings in Chrome, so the lack of
presubmit checks for them results in low translation screenshot coverage.

This CL changes how .grdp files are loaded in the presubmit: Previously,
they were written in a temporary directory alongside a fake .grd file
that referenced the loaded .grdp file. The code loaded the fake .grd file
which resulted in loading the strings in the actual .grdp file. However,
test mocks override all os.path methods which in turn breaks temporary
directory creation. As a result, it was not possible to properly test
the .grdp loading code, so we skipped <part> tags as a workaround.

The new loading code writes a temporary copy of the .grdp file and wraps
its contents with proper tags so that it can be loaded as a .grd file
instead. This avoids the need to create a temporary directory and is
fully testable.

The end result is that Translation Screenshots presubmit will now ask
Chrome devs to upload screenshots for changes in .grdp files. This should
significantly increase the coverage of strings with translation screenshots,
leading to better quality in string localizations.

Bug: 924652
Change-Id: Iae7933e8147cefdabc15ef21d2b6daa43d5002bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1875554
Reviewed-by: anthonyvd <anthonyvd@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714550}
2019-11-12 18:15:42 +00:00
Mohamed Heikal
d048240af6 Add PRESUBMIT.py warning on adding new images to repo
This cl adds a presubmit warning on upload if the CL contains images.
The warning points the author to
//docs/speed/binary_size/optimization_advice.md#optimizing-images so as
to ensure they have read the optimization tips and tried applying them
to their images. There is no easy way to check if the image is optimized
thus the presubmit always fires if there are images but does not block
CQ.

Bug: 921227
Change-Id: Ib8dd144bd2f728b166ca5b1c9d3882df24e0216b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899645
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714507}
2019-11-12 16:57:37 +00:00
James Cook
6b6597ca4a Add presubmit check for Chrome OS pref registration
As part of the Split Settings Sync project Chrome OS settings have a
new sync controls UI. This requires that new prefs be registered with
the type SYNCABLE_OS_PREF instead of SYNCABLE_PREF.

Add a presubmit warning if new code in directories known to be
Chrome OS specific register a pref with the browser registration type.
This is a warning and not an error because it's theoretically possible
to add a browser setting that only affects Chrome OS and hence appears
in a Chrome OS-only directory. There are no such prefs today.

Bug: 1019988
Test: added to PRESUBMIT_test.py
Change-Id: I59b46ac831855ae71d3eb5811b54cabf5ec35995
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1901646
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713186}
2019-11-06 22:05:29 +00:00
Abhijeet Kandalkar
1e7c25067d Prevent further uses of old downcast helpers
Type casting related functions like IsHTMLXXXXElement,
ToHTMLXXXXElement, and ToHTMLXXXXElementOrNull are being phased out in
favor of new downcast helpers in t_p/blink/renderer/platform/casting.h.
There is still a long run to fully remove old type casting mechanism,
but this CL aims at preventing new uses to take place.

Bug: 891908
Change-Id: I6a079b9524d2e94805528bdcf17baaa66fe091da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879628
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Abhijeet Kandalkar <abhijeet@igalia.com>
Cr-Commit-Position: refs/heads/master@{#710345}
2019-10-29 15:05:45 +00:00
Peter Kasting
94a56c4565 Make "using namespace" a PRESUBMIT error.
Bug: 82078
Change-Id: Ibc9405d903008c5bebf04f558e1b2c42ba5ced4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879997
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709655}
2019-10-25 21:54:04 +00:00
Torne (Richard Coles)
3bd7ad0d8e Improve Android log tag presubmit.
Remove reference to a former engineer (the linked doc is sufficient) and
broaden the regex for recognising TAG declarations to also find cases
where the field is not private, as a number of these exist in the code.

Change-Id: If5b8c4e542b06881fc073ffcb1849d9ee70acd24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1873362
Auto-Submit: Richard Coles <torne@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708359}
2019-10-22 21:20:46 +00:00
meacer
e7be753b99 Translation screenshot presubmit: Ignore nonexistent files for removed strings
The presubmit for translation screenshots asks the user to remove screenshots
associated with any strings they removed. This CL checks if the screenshot
exists before asking the user to remove it.

Bug: 924795
Change-Id: I811fe4f3d14ae5448b3dbf87aa0fc0055ec09ce8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1834277
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702089}
2019-10-02 17:41:03 +00:00
Mario Sanchez Prada
2472cab63a [mojo] Add presubmit check to prevent introducing old Mojo types
This change adds a presubmit check preventing new usages of the
following old Mojo types, which are now considered deprecated in
favor of the ones outlined in crbug.com/955171:

  - mojo::AssociatedBinding<>
  - mojo::AssociatedBindingSet<>
  - mojo::AssociatedInterfacePtr<>
  - mojo::AssociatedInterfacePtrInfo<>
  - mojo::AssociatedInterfaceRequest<>
  - mojo::Binding<>
  - mojo::BindingSet<>
  - mojo::InterfacePtr<>
  - mojo::InterfacePtrInfo<>
  - mojo::InterfaceRequest<>
  - mojo::MakeStrongAssociatedBinding()
  - mojo::MakeStrongBinding()
  - mojo::MakeRequest()
  - mojo::MakeRequestAssociatedWithDedicatedPipe()
  - mojo::StrongAssociatedBindingSet<>
  - mojo::StrongBindingSet<>

For now, we will only raise warnings during the presubmit stage
whenever any of these types get introduced in //third_party/blink,
but the plan is to progressively cover more directories and convert
such warnings into errors as soon as more areas get fully migrated
to the new types.

See the "Mojo Bindings Conversion CheatSheet" for more information:
https://docs.google.com/document/d/1Jwfbzbe8ozaoilhqj5mAPYbYGpgZCen_XAAAdwmyP1E

Bug: 955171
Change-Id: I0d40b1507d85cbc11397f9c2fb02fb96a7490911
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796371
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697555}
2019-09-18 10:58:31 +00:00
Max Moroz
b47503bdd8 PRESUBMIT: add check and test for fuzz targets to catch missing header include.
The header (testing/libfuzzer/libfuzzer_exports.h) should be included in fuzz
targets they define optional libFuzzer symbols, as otherwise those symbols may
be stripped by the linker on Mac and fuzz target may work incorrectly, see
https://crbug.com/687076 for more information.

Bug: 991345
Change-Id: I459774f2bc8de708d67c0af455031146592c4799
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1738756
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Abhishek Arya <inferno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685342}
2019-08-08 21:03:27 +00:00
Kinuko Yasuda
0cdb3da737 Do not check include guards in PRESUBMIT for old IPC *_message_generator.h files
They use the include guards in a very specific, peculiar way

Bug: 814776
Change-Id: I5ff8b8840f88ee993b42d7792be6267d3864f583
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1728533
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682943}
2019-07-31 21:50:32 +00:00
Peter K. Lee
6c03ccff64 Adds a PRESUBMIT check to flag uses of EXPECT_OCMOCK_VERIFY in egtests
This macro is meant for GTest unit tests. Using this in EarlGrey tests
will cause legitimate OCMock failed expectations to not reported at the
end of a test run.

Bug: 983652
Change-Id: If6bda23eb9fd85a4c271b82d0ef0dd1153ca2655
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1700527
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Commit-Queue: Peter Lee <pkl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677319}
2019-07-15 14:40:05 +00:00
Oksana Zhuravlova
1d3b59de49 [mojo] Change mojo::ConvertTo presubmit check from error to warning
Bug: 621383
Change-Id: Ie2da4387a8352073c6d2221274b39034c8ee285c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1616148
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660665}
2019-05-17 00:08:22 +00:00
Oksana Zhuravlova
fd24777ec1 [mojo] Add presubmit check for TypeConverter
This change adds a check preventing new usages of mojo::ConvertTo since
TypeConverter is deprecated. The check excludes /third_party/blink and
content/renderer paths for now.

Bug: 621383
Change-Id: I63b36171447863cdd9ee0c42f973c2a8480ee4a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1549453
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#660438}
2019-05-16 16:57:29 +00:00
Makoto Shimazu
3ad422cd62 PRESUBMIT.py undestands line break in the middle of <affected-histogram> tag
Bug: 956838
Change-Id: Ic3868a4f85fc8e4c13f07022800234978b870ee7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1598390
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657577}
2019-05-08 02:35:14 +00:00
Daniel Bratell
65b0332618 Find #include "foo.cc" with a presubmit check
An #include "foo.cc" will often compile, until it causes linking
problems later, for instance in jumbo builds. The error messages are
then not good at pointing out what is wrong.

Change-Id: Ic155dc5542e22b54d13c213230d6df4977263642
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1566344
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653105}
2019-04-23 08:17:06 +00:00
Jinsong Fan
91ebbbd287 Add Presubmit check to recommend BuildInfo.isDebugAndroid
Since userdebug and eng builds are debuggable build of Android.
BuildInfo.isDebugAndroid() is preferred over `Build.TYPE.equals()` or
''.equals(Build.TYPE). The CL adds a presubmit check for that.

Bug: 939924
Change-Id: Id2794374f2185c1f0f50abf9424a87b07467567e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1564363
Commit-Queue: Jinsong Fan <fanjinsong@sogou-inc.com>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#651269}
2019-04-16 14:57:17 +00:00
Kinuko Yasuda
376c2ce1b2 Refine mojo::DataPipe presubmit
Current presubmit is also triggered for the use of mojo::DataPipeDrainer,
which is not deprecated.

R=carlosk@chromium.org,rockot@google.com

Bug: 944990
Change-Id: I522e1ca26b55ad1ba6e2948e80381ba1d84e150e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1567707
Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#651097}
2019-04-16 01:20:37 +00:00