Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,13 @@ jobs:
echo "$(dcm --version)"
- name: Setup Dart SDK
uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
- name: Run DCM on root
- name: Run dcm analyze on root
run: |
dcm analyze packages/devtools_app packages/devtools_app_shared packages/devtools_extensions packages/devtools_shared packages/devtools_test
- name: Run dcm checks on packages
# TODO(https://github.com/flutter/devtools/issues/9906): run on all DevTools packages.
run: |
dcm check-unused-code packages/devtools_app --exclude-public-api

test-packages:
name: ${{ matrix.os }} ${{ matrix.package }} test
Expand Down
15 changes: 15 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,21 @@ dart_code_metrics:
maximum-nesting-level: 5
metrics-exclude:
- test/**
exclude:
unused-code:
# TODO(https://github.com/dart-lang/sdk/issues/63864): clean up these
# paths once this issue is fixed. These paths are currently relative to
# devtools_app/.
# TODO(https://github.com/flutter/devtools/issues/9906) remove these
# excludes as findings are resolved.
- integration_test/**
- lib/src/extensions/**
- lib/src/framework/**
- lib/src/screens/**
- lib/src/service/**
- lib/src/shared/**
- lib/src/standalone_ui/**
- test/**
rules:
# - arguments-ordering Too strict
# - avoid-banned-imports # TODO(polina-c): add configuration
Expand Down
7 changes: 4 additions & 3 deletions packages/devtools_app/lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,11 @@ class DevToolsAppState extends State<DevToolsApp> with AutoDisposeMixin {
// Provide the appropriate page route.
if (pages.containsKey(page)) {
Widget widget = pages[page]!(context, page, params, state);
assert(() {
if (kDebugMode) {
widget = _AlternateCheckedModeBanner(
builder: (context) => pages[page]!(context, page, params, state),
);
return true;
}());
}
return MaterialPage(child: widget);
}

Expand Down Expand Up @@ -618,7 +617,9 @@ typedef UrlParametersBuilder =
///
/// This avoids issues with widgets in the appbar being hidden by the banner
/// in a web or desktop app.
// ignore: unused-code, TODO(https://github.com/flutter/devtools/issues/9907): false positive.
class _AlternateCheckedModeBanner extends StatelessWidget {
// ignore: unused-code, TODO(https://github.com/flutter/devtools/issues/9907): false positive.
const _AlternateCheckedModeBanner({required this.builder});
Comment thread
kenzieschmoll marked this conversation as resolved.
final WidgetBuilder builder;

Expand Down
Loading