23 Commits

Author SHA1 Message Date
Michael Goderbauer
cc50c5249c Sync analysis_options.yaml with flutter/flutter (flutter/engine#34986) 2022-07-29 16:41:04 -07:00
Loïc Sharma
0fd8f28571 Revert "Fix pre-push githooks on Windows and enable all format checks" (flutter/engine#34821) 2022-07-21 20:07:04 +00:00
Márk Tolmács
140e1231cf Fix pre-push githooks on Windows and enable all format checks (flutter/engine#34374) 2022-07-13 22:06:05 +00:00
Zachary Anderson
6f236556a3 Format tools/gn (flutter/engine#33812) 2022-06-03 15:40:21 -07:00
Zachary Anderson
1790d5a019 Adds a python formatter (flutter/engine#33797)
* Adds a python formatter

* Apply format
2022-06-03 13:00:14 -07:00
Jenn Magder
7b792c087d Wrap format script diff in patch command (flutter/engine#29833) 2021-11-19 12:22:04 -08:00
godofredoc
720cd0baaa Prepare scripts for the master to main migration. (flutter/engine#29371)
It changes master branch with main to prepare for the migration.
This change will be landed in synchronization with changes to modify
 the engine default branch to main.

Bug: https://github.com/flutter/flutter/issues/90476
2021-11-15 09:06:11 -08:00
Dan Field
3c17a9fe92 stderr may be null (flutter/engine#27586) 2021-07-20 10:56:01 -07:00
Devon Carew
7f69332a86 remove the use of package:isolate (flutter/engine#27401) 2021-07-14 12:22:31 -07:00
Zachary Anderson
b33fa08ebc Fix import order to unblock Dart roll (flutter/engine#27321) 2021-07-11 22:56:02 -07:00
Zachary Anderson
39f533c8b8 Make ci/lint.dart more idiomatic and move to tools/clang_tidy (flutter/engine#26722) 2021-06-22 20:36:01 -07:00
Zachary Anderson
996427a9ea Clean up Dart scripts in ci/ (flutter/engine#26325) 2021-05-21 13:29:23 -07:00
Chris Bracken
9b4a0264d5 Correct typos throughout the engine/embedder (flutter/engine#25346)
Used the the `misspell` tool available at
https://github.com/client9/misspell, then applied hand-corrections. It's
possible we could adopt this as a presubmit, but there are still enough
false positives that it may not be worth the effort.
2021-04-01 11:08:19 -07:00
Greg Spencer
7e620bae64 Convert format and lint scripts to null safety. (flutter/engine#25078) 2021-03-25 15:09:02 -07:00
Chris Bracken
9482036304 Revert "Define SK_VULKAN for clang-tidy runs (#21927)" (flutter/engine#22012)
This breaks linting on other targets that include skia headers that do
ifdef checks on SK_VULKAN.

This reverts commit 939c3de58aa3ebeed23221b84883aa7bd7365f2e.
2020-10-20 15:17:05 -07:00
Chris Bracken
939c3de58a Define SK_VULKAN for clang-tidy runs (flutter/engine#21927)
When linting flutter/vulkan/vulkan_window.cc, the call to
GrDirectContext::MakeVulkan is undefined when SK_VULKAN is not defined,
triggering a lint error.

Bug: https://github.com/flutter/flutter/issues/68331
2020-10-19 16:31:07 -07:00
Chris Bracken
7665dde319 Require that FLUTTER_NOLINT include issue link (flutter/engine#21922)
This adds enforcement to the linter that all FLUTTER_NOLINT comments be
of the form:

    // FLUTTER_NOLINT: https://github.com/flutter/flutter/issue/ID

Every linter opt-out should have an associated bug describing what issue
it works around so that others can work on eliminating it, or at least
understanding the rationale and whether it's still relevant.

This also reduces the likelihood of inadvertent copy-pasting into new
files either because the author fails to spot it when copying the
copyright block from another file, or assumes that it's necessary for
some subcomponent of the engine.

Bug: https://github.com/flutter/flutter/issues/68273
2020-10-16 17:46:42 -07:00
Greg Spencer
14b9c22b2c Upgrade to latest process runner, fix commands that throw to fail test (flutter/engine#21827)
This fixes the lint script to fail when the clang-tidy command itself fails to execute, and print the exception that was raised.
2020-10-14 14:33:42 -07:00
Greg Spencer
a0f5e6c7aa Fix the format script so that it works with deleted files. (flutter/engine#20679)
When I rewrote the format script, I forgot to filter out deleted files from the list of files that it looks at. This filters the file list to exclude deleted files
2020-08-20 19:03:12 -07:00
Greg Spencer
c001ea6f4a Convert format script to Dart (flutter/engine#20572)
This converts the ci/format.sh script to a Dart script that uses process_runner and isolates to multi-process the clang-format, diffs, and grepping needed to do the formatting changes.

It also will (by default) only check the formatting of changed files.

The user can optionally check all files (--all-files) or do only some types of checks with --check. --verbose prints the versions of the tools used for Clang format and Java format.

Specifying --fix will cause any formatting errors that would have been detected to be fixed.
2020-08-18 13:25:30 -07:00
Greg Spencer
d737cca58e Clean up the CI scripts and make it so that they can be run from anywhere (flutter/engine#20538)
This cleans up the ci scripts so that they can be run from an arbitrary directory, and so that they don't have any bash lint issues, and are more explicit about which dart/pub/dartanalyzer executable they run.

I also fixed the format script to take a "--fix" argument that will fix all of the formatting issues found, including trailing whitespace and gn files.

I added a warning to the license script about untracked/ignored files in the fluttter repo because those so often trip up the license script.

I added missing license information to the ci scripts too.

There's now a bit of boilerplate at the beginning of each script (the follow_links function) in order to reliably find the actual location of the script: I'd put it into a common file, except that that code would be needed to reliably find the common location too, so I needed to duplicate it. It's the same boilerplate as what is used in the flutter/flutter repo for the flutter and dart scripts.

I deleted the ci/test.sh script, since it seems to be obsolete (the test it tries to run doesn't exist anywhere).
2020-08-17 14:03:01 -07:00
Zachary Anderson
95b2fed2dc Enable more linting (flutter/engine#20187) 2020-07-31 21:30:58 -07:00
Greg Spencer
150c46e469 This makes the lint script use multiprocessing to speed it up. (flutter/engine#19987)
I got tired of waiting for it to run, so I added some of the "worker" queue code that I wrote for the assets-for-api-docs generator.

I also tried out putting all the files in one call to clang-tidy with the -p argument, but that was still a lot slower because it runs them all on one core. This runs separate jobs for each file, simultaneously, and then reports the results at the end (associated with each file, of course).
2020-07-30 20:23:30 -07:00