174 Commits
Author SHA1 Message Date
Nikolay Vitkov 77ba8df5a3 [stylelint] Run test on Presubmit
We missed running this test and thus didn't catch some changes.

Bug: none
Change-Id: I4781780c6df539671bf3191b888fb8ca8ae436b2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6401394
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
2025-03-27 08:40:23 -07:00
Benedikt Meurer eaa17749a3 [cleanup] Use Gerrit IfThisThenThat Lint.
This replaces the custom presubmit logic from
https://crrev.com/c/5272391 with Gerrit IfThisThenThat linter logic,
which is also what Chromium generally uses specifically for UMA
histogram related code.

Bug: 41496595, 394756426
Change-Id: Ib5b18639de1354e586bb58d6b83ef5c92d2f1146
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6239300
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2025-02-07 04:12:13 -08:00
Nikolay Vitkov 5b2bcff17f [lint] Improvements and fixes to linting
Rerun all files if `lit-analyzer` rules change. Add support for EsLint
cache - `npm run lint` delta first run vs second of over 2 min. Don't
run EsLint if all files are ignored.

Bug: none
Change-Id: I042ede01cf0fe6de63b066723e1dc61cae3f9dcc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6213930
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2025-01-29 21:21:13 -08:00
Nikolay Vitkov 2205050d6a [eslint] Add extensions folder to linting
Includes linting of the extensions folder.
Also add .mjs files to the PRESUBMIT which was previously missing.

Bug: none
Change-Id: I6ae5bb8a218461c3b2bf07d95310d79c57f2cdd9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6177277
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
2025-01-21 04:58:17 -08:00
Philip Pfaffe b74da23114 Fix path checks in presubmit
Bug: none
Change-Id: Ic1823aada590c945e4a37eacd6de1aeecdb732e8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6182148
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org>
2025-01-20 02:41:14 -08:00
Adam Raine a2d550676e Fix PRESUBMIT.py bug allowing excluded files to be checked
Bug: None
Change-Id: Ieee9b46650d75fa5a5e5aca5dc6d5c70efc4312c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6163963
Auto-Submit: Adam Raine <asraine@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Adam Raine <asraine@chromium.org>
2025-01-09 07:16:02 -08:00
Nikolay Vitkov 2a1b3b34b1 Update StyleLint to v16
Stylelint v16 deprecated CJS so I moved our lint script to ESM,
and fixed all the deprecation warning.
The only place I needed to silence them were tests,
as we import CJS there.

Bug: none
Change-Id: Iae4d2df76c855a9738b774a2d035f22509770215
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6138610
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2025-01-03 02:57:06 -08:00
Nikolay Vitkov 55adf677d3 [eslint] Migrate to Flat config
A necessary step to adopt EsLint v9.
More can be read at - https://eslint.org/blog/2022/08/new-config-system-part-2/
In short - only a single configuration is used a cross the whole repo.

Bug: none
Change-Id: I74cd613fba25b94cee92e4b7c1b525471bcbe44b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6059264
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2025-01-02 04:58:36 -08:00
Benedikt Meurer 586a9a5908 [eslint] Adopt ESLint Rule Naming Conventions.
Update our custom ESLint rules to follow the official naming
conventions[^1], in particular the rule names need to

1. consistently use dashes to separate words (rather a mix of
   underscores and dashes), and
1. consistently use `no-` prefix for rules that disallow something.

Drive-by-fix: Also remove the `fixable` setting from rules that don't
provide a fix.

This is a functionally neutral change.

[^1]: https://eslint.org/docs/latest/contribute/core-rules#rule-naming-conventions

Fixed: 386319581
Change-Id: Ifcb6c0e4ca8334a263be6534596c30b3bcca243b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6110726
Reviewed-by: Samiya Caur <samiyac@chromium.org>
Commit-Queue: Samiya Caur <samiyac@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
2024-12-27 02:54:56 -08:00
Alex Rudenko 518bfaea13 Fix presubmit on Windows
Previously, we added --full to work around the problem
which was fixed for the code branch invoked without the
--full switch but still is the problem for the --full arg.
This change removes the --full switch
as it is buggy on Windows (https://crbug.com/381836586)

Bug: 381836586
Change-Id: I6f94ff8bce457a5997059ee8c8e8563454a91325
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6063659
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
2024-12-02 13:42:38 +00:00
Benedikt Meurer 6dd23b607f Update PRESUBMIT linting logic.
Bug: 323795352
Change-Id: I1a811ca37e11cd4ab7ecef12a891fafd5e3d526c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5797139
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2024-08-20 12:38:12 +00:00
Benedikt Meurer e6a39dc688 [scripts] Provide a single npm run lint command.
This unifies the current set of two dedicated scripts for running ESLint
and stylelint into a single script, with a single npm run-script
command. We need to migrate the Infra and devtools-internal before we
can fully remove the old scripts.

Bug: 360832181
Change-Id: Ifb98d882d951fb3e1c9d7ff8aae22c8d844ced55
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5796886
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2024-08-19 16:04:20 +00:00
Benedikt Meurer bc9da61308 [docs] Subsume the outdated DevTools Testing overview.
Include everything that was still missing from the Testing overview
document[^1] into our main testing guide.

[^1]: https://docs.google.com/document/d/1c2KLKoFMqLB2A9sNAHIhYb70XFyfBUBs5BZSYfQAT-Y

Bug: 343896438
Change-Id: I852ac9e3a035f2c01ced7c59a6db2ad374ea3f88
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5789709
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2024-08-19 11:11:17 +00:00
Gavin Mak 4a41e48630 Skip _CheckNoUncheckedFiles and _CheckFormat if on cog
These checks are unsupported on cog because they rely on git. Skip
them as to not fail on cog.

Bug: b/333744051
Change-Id: Iea32aa26d94a9f1494ea987835ed64584b7c84db
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5748641
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2024-07-31 17:47:27 +00:00
Alex Rudenko 537c631ab8 Bump vulnerable deps
Drive-by: fixing the presubmit

Fixed: 343248814
Change-Id: I3ec86edbe2ce3d6e7b6a310827b5b5fb0b09c626
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5720898
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2024-07-19 07:12:02 +00:00
Jack Franklin 6bc1cbd8bc Enable DoNotSubmit checks in PRESUBMIT
This check will fail if the CL contains the phrase
`DO<SPACE>NOT<SPACE>SUBMIT` in any of the files.

Bug: none
Change-Id: I3055082c90a40de5f5b97208edc9ea895f2f25ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5688031
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2024-07-09 11:09:42 +00:00
Riley Wong f0be6ecace Skip CheckChangeOnUpload for non-git workspaces
This is a temporary fix to allow CheckChangeOnUpload to run in Cider. The check relies on a node hook generated by gclient sync, which is not supported in internal repositories in Cider.

Bug: 333744051
Change-Id: I5de1eb0bd9f36e18e5e83c7d2d1a6e5a1940afca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5555481
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Riley Wong <rgw@google.com>
2024-05-22 17:05:18 +00:00
Alex Rudenko 4a7a324e23 Check node_modules in presubmit
Bug: none
Change-Id: I9debdc279467a22ddf61eb5a6b43c99fbd9b3820
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5465760
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2024-04-18 11:03:22 +00:00
Philip Pfaffe ce5afc0d07 [testing] Use fixed paths to refer to snapshots/screenshots
This avoid special casing and passing golden locations around. In order to nicely reference snapshots, we move them next to the test files since snapshots are looked up by test name anyways.

Bug: b:333423685
Change-Id: I02188633f25dffe8f863d64b1e769cbb5563b2b6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5435761
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2024-04-10 13:49:46 +00:00
Alex Rudenko b1b505a388 Remove DISABLE_THIRD_PARTY_CHECK checks
The check makes fixing rolls more difficult and it does not
always pick the message from the local vs gerrit commit message.

Bug: none
Change-Id: I16cfb1e1e2d9b6439e74f125b60d2ada12b6c29c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5418694
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2024-04-03 08:47:38 +00:00
Simon Zünd cc99413cfc [presubmit][deps] Format touched files fully when we suspect large diffs
'git cl format', by default, only formats the changed lines for each
file. It does so by forwarding the changed lines from git to
clang-format on the command line.

For large diffs, this results in very large command line invocations
that run into the limit on windows.

As a heuristic, we should just format all changed files fully if we
suspect this might be the case.

Note that previously we skipped formatting alltogether when e.g.
node_modules was changed.

R=alexrudenko@chromium.org, ergunsh@chromium.org

Bug: 40272289
Change-Id: Ic7648a0ad81f6e27f84e07c3497542a61acd4d3a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5297179
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2024-02-15 08:04:22 +00:00
Wolfgang Beyer e57322c09c Add presubmit check for UMA Enumerated Histograms
The enumerated histograms enum is defined in 2 separate files. Since
this cannot be avoided easily, this CL adds a presubmit check which
ensures that both implementations contain the same content.

Fixed: b/41496595
Change-Id: I629f9e6a7ee409f2be6deb085a0401f0792e0805
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5272391
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2024-02-08 12:38:26 +00:00
Liviu Rau f302860d6e Report individual checks to rdb
Should allow for tracking the duration of individual checks in presubmit.

However the Milo test result page seems to have some bugs: https://crbug.com/1501295, https://crbug.com/1501297

Bug: none
Change-Id: I68371f0f0f31ea3666264452b4fb8f0eb9acd326
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5018098
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Liviu Rau <liviurau@google.com>
2023-11-10 12:29:07 +00:00
Philip Pfaffe f9efa2af72 Sync git submodules with DEPS and add PRESUBMIT
PRESUBMIT checks ensures that hashes used in gitlinks are present in
DEPS file.

R=pfaffe@google.com

Bug: 1469907
Change-Id: I616cecb51994592d80d5f6611214b6224fbc5151
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4749720
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2023-08-04 11:48:31 +00:00
Jack Franklin 39f548e192 Remove unused variable in PRESUBMIT
Spotted today; think it was an accidental leftover from a copy and
paste.

Bug: None
Change-Id: Ia8d80a3e608251480f571145bc95d614f3d9ddb9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4361241
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Nancy Li <nancyly@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Nancy Li <nancyly@chromium.org>
2023-03-22 15:57:43 +00:00
Simon Zünd 2ce6754100 Auto-generate deprecation info from rolled blink file
We now roll a "deprecation.json5" file from blink into DevTools that
serves as the canonical source for deprecations: It contains the
english message + note for translators as well as additional
metadata such as milestone and chrome feature number.

To use the .json5 in a somewhat type-safe way, we generate
TypeScript that is type-checked against the DeprecationIssueType
from CDP.

Note that we also generate a standard UIStrings structure that
we'll import in "DeprecationIssue.ts". An alternative would be to
collect to strings directly from the .json5 but that would
complicate "npm run collect-strings" as we'd have to teach those
scripts how to parse the .json5.

DISABLE_THIRD_PARTY_CHECK=Add newly generated file
R=alexrudenko@chromium.org

Bug: 1411444
Change-Id: Ifcfd4291ebfc3a70c100ba4a5fbefc485d4a5493
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4227691
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-02-07 11:06:16 +00:00
Andrés Olivares 205bf68542 Check for obsolete screenshot test goldens on PRESUBMIT
Porting the internal script to devtools-frontend. Folders are created for each platform to prevent file not found errors.

The implementation is almost identical to the internal version, except:

  - Support for windows presubmit bots, on which this didn't run before.
  - Interactions root folder is passed as an argument to the script.

Bug: 1407638
Change-Id: Ia373ad258071cdcc0f7e5b417fcc2301d43084ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207837
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2023-02-01 12:59:59 +00:00
Jack Franklin b5a63097ce Ensure ESBuild versions are in sync in PRESUBMIT
We have ESBuild as a dep in two places:

1. `DEPS`, managed by gclient
2. `manage_node_deps.py`, managed by npm

These versions need to match, otherwise any builds that use `esbuild`
will fail in Chrome land. This CL introduces a script and PRESUBMIT
check to ensure that the two versions are in sync.

Bug: none
Change-Id: I7ea9172ae386e4e21e1ac82c208d171b65b29e22
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4067299
Reviewed-by: Liviu Rau <liviurau@google.com>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-12-01 10:02:04 +00:00
Simon Zünd 9ff4da6ff0 [l10n] Replace collect-strings.js with check-strings.js for PRESUBMIT
Now that we generate en-US.json/en-XL.json at build time, we can
adjust the presubmit script to use "check-strings.js" instead.

R=alexrudenko@chromium.org

Bug: 1185727
Change-Id: I827112dd7059e817d230e0aa342d32128826adea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4046521
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-11-22 12:10:10 +00:00
Philip Pfaffe f4320aa3bc Run presubmit sub-scripts with python3
The presubmit script accidentally has been running sub-scripts using
python2. This not only stands in the way of the python3 migration, but
also causes the protocol resource generation script to add superfluous
trailing whitespaces during presubmit.

DISABLE_THIRD_PARTY_CHECK=Regenerate protocol resources with python3

Bug: none
Change-Id: I67feb8d48bc6c81706e65773693176a3a467ceff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3779542
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-07-21 12:15:15 +00:00
Changhao Han cb6885fe94 Remove unintentional line in PRESUBMIT script
Bug: None
Change-Id: I2cdb5a755d51c999db1b69e45946ac7069834d69
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3769847
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Auto-Submit: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2022-07-18 10:22:23 +00:00
Saba Khukhunashvili 0cdc5a9588 Added javascript_metadata as an exclusive change directory
Added javascript_metadata folder in the EXCLUSIVE_CHANGE_DIRECTORIES, as NativeFunction.js file is generated by roll_deps.py after running the generate-protocol-resoruces.

Bug: none
Change-Id: I80a1341f7de981397eec3f4a0c9b4f2568e167b7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3762475
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2022-07-18 09:58:33 +00:00
Jack Franklin 3a80260722 Inline type imports in front_end
This CL enables the `inline_type_imports` rule for devtools-frontend,
and is the result of running the auto-fixer to update all imports
accordingly.

Bug: 1319340
Change-Id: I303256476fd4e94f4505bbf4355c0070ac101aa9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3752799
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-07-13 09:26:00 +00:00
Jack Franklin 130d2ae03b Disable clang/eslint in front_end/generated
This CL disables formatting within the `generated` directory, which is
all code that is programatically generated. Previously we disabled
eslint for `protocol.ts`, but now we are being consistent and disabling
it (and clang) for all files.

I also re-generated the files in the generated folder, so we avoid any
confusion if/when the generated scripts get re-run and suddenly the
format drastically changes.

DISABLE_THIRD_PARTY_CHECK=changing generated files + config

Bug: none
Change-Id: I714ada8bf7d85020e3be71b35c9db98840bf3ef2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3755163
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2022-07-12 10:51:50 +00:00
Liviu Rau 07128d11d4 Cleanup dead code
Bug: 1130536
Change-Id: I2e3278384d997e315ec3615a61c44e0442b1b66c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3484195
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2022-02-25 09:57:51 +00:00
Tim van der Lippe 800d875627 Add build script tests
You can run these tests with `npm run build-test`, while we also run
them as part of our PRESUBMIT if we make any changes to the build
folder.

R=yangguo@chromium.org
CC=tikuta@chromium.org

Bug: 1293772
Change-Id: Id3b02c83398d2346a4ec5a06f3b938d33070d4f7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3439987
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
2022-02-04 13:25:10 +00:00
Tim van der Lippe c2756dca20 Consider all OWNERS changes as exclusive
I have verified locally that the check will error if you create a commit
that includes both a nested OWNERS file and any other change.

R=jacktfranklin@chromium.org

Fixed: 1029775
Change-Id: Ied7875aeb5b805594dc89107ff5e5a1827bf62e8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3322832
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-12-08 13:05:28 +00:00
Tim van der Lippe 2ec9790ec5 Remove build_release_applications and friends
This script is now unused and fully replaced by GN. As such, this
concludes the full `module.json` migration and related scripts, which
means we can consider crbug.com/1127902 fixed.

R=jacktfranklin@chromium.org

Fixed: 1127902
Change-Id: I0fde9c4fede0cdc8649e5e455e025a70ed4d2a09
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3310869
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-12-02 12:08:02 +00:00
Tim van der Lippe 8aeee41bc7 Remove module.json schema checks
We have now removed all module.json files, so these checks are obsolete.

R=jacktfranklin@chromium.org

Bug: 1127902
Change-Id: Iefe8538474b77f78eed010b0fad9461873bad03c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3310603
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-12-02 11:28:37 +00:00
Tim van der Lippe 6509dba7ff Update lit-html to 2.0.2
R=jacktfranklin@chromium.org

Bug: none
Change-Id: I232931331d85cb3e17fa160d547fb084f8cd9200
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3297843
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-11-24 09:29:23 +00:00
Tim van der Lippe f9e565ef89 Add new run_lint_check_js.mjs
ESLint 8 removed CLIEngine. Therefore, we need to migrate away from
CLIEngine to the main ESLint class (which already exists in ESLint 7).
However, that class is based on promises, which means we can't use them
in a CommonJS context.

Therefore, introduce a new `.mjs` version that uses ES modules (which
can do as we are on a recent version of Node) and use the promise
versions. There are no other functional changes compared to the old
`.js` script.

The reason that we first have to add this file here, is that our CQ
directly refers to the `.js` version. That means we first land this CL,
we update our CQ configuration and only then can we remove the `.js`
file from our repository.

R=jacktfranklin@chromium.org

Bug: none
Change-Id: Iad3656931ae09eb7f9f23b3e6ad7d39c8a761a31
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3268299
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2021-11-09 10:25:30 +00:00
Tim van der Lippe 16b822804c Reland "Reland "Update stylelint to 14.0.1""
This reverts commit 2b4a9df2d9.

Reason for revert: subsequent presubmit uploads should be fixed now.

Original change's description:
> Revert "Reland "Update stylelint to 14.0.1""
>
> This reverts commit f2ea2c940d.
>
> Reason for revert: https://ci.chromium.org/ui/p/devtools-frontend/builders/try/dtf_presubmit_linux/b8831129368825517985/overview
>
> Original change's description:
> > Reland "Update stylelint to 14.0.1"
> >
> > This reverts commit 6c0f161c95.
> >
> > Reason for revert: the prerequisite CL (https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259703) has landed
> >
> > Original change's description:
> > > Revert "Update stylelint to 14.0.1"
> > >
> > > This reverts commit 1e08ee816b.
> > >
> > > Reason for revert: tree is closed due to errors https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Linux/8169/overview
> > >
> > > Original change's description:
> > > > Update stylelint to 14.0.1
> > > >
> > > > This also upgrades PostCSS to 8.3.11.
> > > >
> > > > DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration
> > > > R=​szuend@chromium.org
> > > >
> > > > Bug: none
> > > > Change-Id: I606540b03509d7c6e73f3d490327cd4174e03d31
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259541
> > > > Reviewed-by: Simon Zünd <szuend@chromium.org>
> > > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > >
> > > Bug: none
> > > Change-Id: Icb1c02b41dbccc3b4fc5760f5dd0b78eca078b61
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3263399
> > > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > > Owners-Override: Alex Rudenko <alexrudenko@chromium.org>
> > > Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
> >
> > DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration
> >
> > Bug: none
> > Change-Id: If132a67ee4253d27114caedd66c5ee61c774a6c7
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264206
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Simon Zünd <szuend@chromium.org>
> > Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
>
> Bug: none
> Change-Id: Idc6c9f5cc1e225c752799461eb0344e94b4ad1e5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264222
> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration

Bug: none
Change-Id: I609941d48b46bfcf454b03dcc75a76d460fbe674
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264223
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-11-08 14:47:39 +00:00
Tim van der Lippe 2b4a9df2d9 Revert "Reland "Update stylelint to 14.0.1""
This reverts commit f2ea2c940d.

Reason for revert: https://ci.chromium.org/ui/p/devtools-frontend/builders/try/dtf_presubmit_linux/b8831129368825517985/overview

Original change's description:
> Reland "Update stylelint to 14.0.1"
>
> This reverts commit 6c0f161c95.
>
> Reason for revert: the prerequisite CL (https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259703) has landed
>
> Original change's description:
> > Revert "Update stylelint to 14.0.1"
> >
> > This reverts commit 1e08ee816b.
> >
> > Reason for revert: tree is closed due to errors https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Linux/8169/overview
> >
> > Original change's description:
> > > Update stylelint to 14.0.1
> > >
> > > This also upgrades PostCSS to 8.3.11.
> > >
> > > DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration
> > > R=​szuend@chromium.org
> > >
> > > Bug: none
> > > Change-Id: I606540b03509d7c6e73f3d490327cd4174e03d31
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259541
> > > Reviewed-by: Simon Zünd <szuend@chromium.org>
> > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> >
> > Bug: none
> > Change-Id: Icb1c02b41dbccc3b4fc5760f5dd0b78eca078b61
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3263399
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Owners-Override: Alex Rudenko <alexrudenko@chromium.org>
> > Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
>
> DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration
>
> Bug: none
> Change-Id: If132a67ee4253d27114caedd66c5ee61c774a6c7
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264206
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>

Bug: none
Change-Id: Idc6c9f5cc1e225c752799461eb0344e94b4ad1e5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264222
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-11-08 12:59:31 +00:00
Tim van der Lippe f2ea2c940d Reland "Update stylelint to 14.0.1"
This reverts commit 6c0f161c95.

Reason for revert: the prerequisite CL (https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259703) has landed

Original change's description:
> Revert "Update stylelint to 14.0.1"
>
> This reverts commit 1e08ee816b.
>
> Reason for revert: tree is closed due to errors https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Linux/8169/overview
>
> Original change's description:
> > Update stylelint to 14.0.1
> >
> > This also upgrades PostCSS to 8.3.11.
> >
> > DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration
> > R=​szuend@chromium.org
> >
> > Bug: none
> > Change-Id: I606540b03509d7c6e73f3d490327cd4174e03d31
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259541
> > Reviewed-by: Simon Zünd <szuend@chromium.org>
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
>
> Bug: none
> Change-Id: Icb1c02b41dbccc3b4fc5760f5dd0b78eca078b61
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3263399
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Alex Rudenko <alexrudenko@chromium.org>
> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>

DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration

Bug: none
Change-Id: If132a67ee4253d27114caedd66c5ee61c774a6c7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264206
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-11-08 11:24:28 +00:00
Tim van der Lippe f746fe4a57 Revert "Fix all issues found by StyleLint 14"
This reverts commit fb8852321b.

Reason for revert: breaks the presubmit. Since the tree is closed,
a fix forward is not landing soon. Therefore, let's pre-emptively revert.

Original change's description:
> Fix all issues found by StyleLint 14
>
> These are mostly auto-fixed by Stylelint 14 with a couple of manual
> fixes (adding quotes around urls and fixing some shorthand properties).
>
> A follow-up CL will update us to Stylelint 14, at which point they will
> be enforced.
>
> R=​szuend@chromium.org
>
> Bug: none
> Change-Id: Ia813854accd1eb86eccea64a5fbf1f8534563964
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259540
> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>

Bug: none
Change-Id: I155ef7e0633cba15b47439a37a71158b6dcb8f91
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259702
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-11-04 16:13:19 +00:00
Tim van der Lippe fb8852321b Fix all issues found by StyleLint 14
These are mostly auto-fixed by Stylelint 14 with a couple of manual
fixes (adding quotes around urls and fixing some shorthand properties).

A follow-up CL will update us to Stylelint 14, at which point they will
be enforced.

R=szuend@chromium.org

Bug: none
Change-Id: Ia813854accd1eb86eccea64a5fbf1f8534563964
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259540
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-11-04 15:20:38 +00:00
Jack Franklin 03db63a826 Use mocha_path() from devtools_paths in PRESUBMIT
Cleaner and uses a path that is happy on Windows.

Bug: none
Change-Id: Ia1f7952adb7b8a6591a8abc145ad321463f1e6e3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3165096
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2021-09-16 14:12:05 +00:00
Jack Franklin 1aa212ddfe Run ESLint tests in PRESUBMIT if changes in eslint_rules folder
Ensures that if a CL touches files in scripts/eslint_rules, we will run
the tests as part of the PRESUBMIT. We have so many rules now and rely
on them to enforce a lot, so it's important we ensure they don't get
broken; currently they are never run on CQ at all so it's easily to
accidentally break it and not realise.


Bug: None
Change-Id: Ic56166404f56787b60eb18b5b375c61dc00ba1df
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3151806
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-09-10 15:07:14 +00:00
Simon Zünd fb7befcb75 [i18n] Remove i18n-bundle, the bundling script and the PRESUBMIT check
No users of the bundle left, so it can safely be removed. A last
cleanup step will remove the NPM packages necessary for bundling.

R=tvanderlippe@chromium.org

Bug: 1231873
Change-Id: I372f66339131a280c78514326d3527cbaa6cb6ea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3055246
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-07-27 14:56:29 +00:00
Tim van der Lippe a53672de83 Check license headers for CSS files during PRESUBMIT
This mirrors the license header checks we perform for
Python-like files and apply the same logic for CSS.

To do so, we modify the relevant regexes and patch
function to use the correct version of comment structure
for CSS files (which use `/*` rather than `#` as delimiters).

R=jacktfranklin@chromium.org

Bug: 1106746
Change-Id: I51d51e9b793a1015aeb20a3b3a55e075c2ee748f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3014756
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-07-13 12:28:56 +00:00