68353d76a4
- Adds a new flag, `--suppress-analytics` to the `dart` command to disable both the unified and the legacy analytics for a single session while deprecating the existing flag, `--[no-]analytics` used for disabling the legacy analytics on a single pass. - Pipelines the flag from `dart` through `dart analyze` and `dart fix` to the execution of the analysis server. - Updates all applicable uses of `dart analyze`, `dart fix`, and the analysis_server binary entry points in the SDK to disable analytics for the test infrastructure. Bug: https://github.com/dart-lang/sdk/issues/49445 Change-Id: I1302cad7e04b21454aa7d9e8ee72a876b231377d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287661 Reviewed-by: William Hesse <whesse@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Janice Collins <jcollins@google.com>
41 lines
1.1 KiB
Bash
Executable File
41 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
# Analyze Dart code in the flutter/packages repo.
|
|
|
|
set -e
|
|
|
|
checkout=$(pwd)
|
|
export PATH=$checkout/out/ReleaseX64/dart-sdk/bin:$PATH
|
|
dart=$checkout/out/ReleaseX64/dart-sdk/bin/dart
|
|
sdk=$checkout/out/ReleaseX64/dart-sdk
|
|
tmpdir=$(mktemp -d)
|
|
|
|
cleanup() {
|
|
rm -rf "$tmpdir"
|
|
}
|
|
|
|
trap cleanup EXIT HUP INT QUIT TERM PIPE
|
|
cd "$tmpdir"
|
|
|
|
# install flutter
|
|
git clone --single-branch -vv https://github.com/flutter/flutter
|
|
export PATH="$PATH":"$tmpdir/flutter/bin"
|
|
flutter --version
|
|
|
|
# get the flutter/packages repo
|
|
git clone --single-branch -vv https://github.com/flutter/packages
|
|
cd packages
|
|
|
|
# validate the tool's source
|
|
(cd script/tool; dart pub --suppress-analytics get)
|
|
(cd script/tool; dart analyze --suppress-analytics --fatal-infos)
|
|
|
|
# Invoke the repo's analysis script.
|
|
dart run script/tool/bin/flutter_plugin_tools.dart analyze \
|
|
--analysis-sdk $sdk \
|
|
--custom-analysis=script/configs/custom_analysis.yaml
|