Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add et lint command #51238

Merged
merged 4 commits into from
Mar 13, 2024
Merged

Add et lint command #51238

merged 4 commits into from
Mar 13, 2024

Conversation

johnmccutchan
Copy link
Contributor

  • Invokes lints for dart, python, c, and java.
  • Captures all output of executions into an artifacts file (a json file).
  • Runs lints concurrently.
  • Cool status display while running.
  • Tests.

@johnmccutchan johnmccutchan force-pushed the et_lint branch 2 times, most recently from 951e075 to f6b2ace Compare March 6, 2024 21:44
Copy link
Contributor

@matanlurey matanlurey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable.

Most of my comments are optional, feel free to do the ones you have time for, and I'd leave TODOs the ones you agree with but want to us to collectively handle post-merge.

ci/analyze.sh Show resolved Hide resolved
tools/engine_tool/lib/src/commands/lint_command.dart Outdated Show resolved Hide resolved
// TODO(loic-sharma): Relax this restriction.
if (environment.platform.isWindows) {
environment.logger
.error('lint command is not supported on Windows (for now).');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consider just adding a logger.fatal that:

  • Throws FatalError(...)
  • The root program catches it, displays it (in verbose mode, with a stack trace), and returns 1

tools/engine_tool/lib/src/commands/lint_command.dart Outdated Show resolved Hide resolved
return 1;
}
final bool verbose = globalResults![verboseFlag] as bool;
final ProcessQueue pq = ProcessQueue(environment);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zach has some similar classes for this in other parts of tools/, I'd check if we could either use it, or at least make sure we're not creating multiple things to do roughly the same thing (I'd look in tools/clang_tidy as a start).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tools/engine_tool/lib/src/dart_utils.dart Outdated Show resolved Hide resolved
tools/engine_tool/lib/src/proc_utils.dart Outdated Show resolved Hide resolved
}

/// Returns the dart-sdk/bin directory.
String findDartBinDirectory(Environment env) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bin/et{.bat} invokes the engine tool entrypoint using the prebuilt dart binary under prebuilts, so you might also just use the parent directory of env.platform.resolvedExecutable for this.

@johnmccutchan johnmccutchan added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 12, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 12, 2024
Copy link
Contributor

auto-submit bot commented Mar 12, 2024

auto label is removed for flutter/engine/51238, Failed to merge flutter/engine/51238 with Pull request flutter/engine/51238 could not be merged: Head branch is out of date. Review and try the merge again..

- Invokes lints for dart, python, c, and java.
- Captures all output of executions into an artifacts file (a json file).
- Runs lints concurrently.
- Cool status display while running.
- Tests.
@johnmccutchan johnmccutchan force-pushed the et_lint branch 5 times, most recently from 7be17cc to f4e1b3c Compare March 13, 2024 01:48
@johnmccutchan johnmccutchan merged commit 2871c26 into flutter:main Mar 13, 2024
24 of 25 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 13, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 13, 2024
…145067)

flutter/engine@285b9fb...2871c26

2024-03-13 [email protected] Add et lint command (flutter/engine#51238)
2024-03-13 [email protected] Refactor `golden_tests_harvester`, throw when not `--dry-run`, add tests. (flutter/engine#51364)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants