Start a dev/checks_tool directory. (#170493)

Towards https://github.com/flutter/flutter/issues/170491.
This commit is contained in:
Matan Lurey 2025-06-14 08:51:26 -07:00 committed by GitHub
parent 0f06b78ad3
commit d8d53ea78b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 65 additions and 0 deletions

View File

@ -2677,6 +2677,7 @@ const Set<String> kExecutableAllowlist = <String>{
'dev/bots/codelabs_build_test.sh',
'dev/bots/docs.sh',
'dev/checks',
'dev/conductor/bin/conductor',
'dev/conductor/bin/packages_autoroller',
'dev/conductor/core/lib/src/proto/compile_proto.sh',

25
dev/checks Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
# Needed because if it is set, cd may print the path it changed to.
unset CDPATH
# Lookup the parent directory of the script (../), the Flutter SDK root.
PROG_NAME="${BASH_SOURCE[0]}"
DEV_DIR="$(
cd "${PROG_NAME%/*}"
pwd -P
)"
FLUTTER_ROOT="$(
cd "$DEV_DIR/.."
pwd -P
)"
# Run the tool.
pushd "$FLUTTER_ROOT/dev/checks_tool" >/dev/null
dart run --resident --quiet bin/checks.dart
popd >/dev/null

14
dev/checks_tool/README.md Normal file
View File

@ -0,0 +1,14 @@
# Flutter Repository Checks
Repository-wide (excluding `engine/**`) analysis and code health checks.
This directory is an experimental project to modularize the code that lives
today in [`dev/bots/analyze.dart`](../bots/analyze.dart), and make it fast
enough (and compatible with) an optional git-commit hook. If you have any
questions or concerns, see [#170491](https://github.com/flutter/flutter/issues/170491).
## Usage
```sh
./dev/checks
```

View File

@ -0,0 +1 @@
include: ../../analysis_options.yaml

View File

@ -0,0 +1,9 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:io' as io;
void main(List<String> args) {
io.stdout.writeln('Hello World');
}

View File

@ -0,0 +1,14 @@
name: checks_tool
environment:
sdk: ^3.7.0-0
resolution: workspace
dependencies:
args: any
dev_dependencies:
test: any
# PUBSPEC CHECKSUM: foei0u

View File

@ -16,6 +16,7 @@ workspace:
- packages/fuchsia_remote_debug_protocol
- packages/flutter_web_plugins
- packages/flutter_goldens
- dev/checks_tool
- dev/devicelab
- dev/manual_tests
- dev/tracing_tests