Commit Graph

3 Commits

Author SHA1 Message Date
Michael Goderbauer
5491c8c146
Auto-format Framework (#160545)
This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.

**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.

---------

Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
2024-12-19 20:06:21 +00:00
Michael Goderbauer
06dd9a3525
Properly report dart format errors (#160364)
This applied the improvements from
https://github.com/flutter/engine/pull/57206 to the flutter/flutter
version of that script (hopefully, we can deduplicate this soon with the
repo merge).
2024-12-16 23:35:01 +00:00
Michael Goderbauer
c4dc2c9890
Add script to check format of changed dart files (#160007)
The script is modeled after a similar script in the engine (see engine's
[format.dart](https://github.com/flutter/engine/blob/main/ci/bin/format.dart)).

It identifies the files that have been changed and checks if their
formatting is correct. It also offers an option to correct formatting
(`--fix`) and an option to check the formatting of all files in the
repro (not just changed ones, `--all-files`).

When we are enforcing dart format this script will be called as part of
presubmit.
2024-12-11 19:38:24 +00:00