From ef8f0d0ee96d7a480eaabe27b7c8270b76ee635b Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Fri, 7 Aug 2026 12:27:35 -0400 Subject: [PATCH 1/3] Migrate to skills_lint package --- ...skills_lint_ignore.json => skills_lint_ignore.json} | 0 analysis_options.yaml | 7 +++++++ tool/pubspec.yaml | 10 +++++----- tool/{dart_skills_lint.yaml => skills_lint.yaml} | 2 +- tool/test/validate_skills_test.dart | 5 +++-- 5 files changed, 16 insertions(+), 8 deletions(-) rename .agents/skills/{dart_skills_lint_ignore.json => skills_lint_ignore.json} (100%) rename tool/{dart_skills_lint.yaml => skills_lint.yaml} (95%) diff --git a/.agents/skills/dart_skills_lint_ignore.json b/.agents/skills/skills_lint_ignore.json similarity index 100% rename from .agents/skills/dart_skills_lint_ignore.json rename to .agents/skills/skills_lint_ignore.json diff --git a/analysis_options.yaml b/analysis_options.yaml index 207a8e959bb..efba7da936b 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -30,6 +30,13 @@ analyzer: # these files if you want to ensure code is not invalid except where # expected. - packages/devtools_app/test/test_infra/test_data/syntax_highlighting/** + - build/** + - android/** + - ios/** + - web/** + - windows/** + - macos/** + - linux/** linter: rules: diff --git a/tool/pubspec.yaml b/tool/pubspec.yaml index 98aed9d5469..ced0f22226d 100644 --- a/tool/pubspec.yaml +++ b/tool/pubspec.yaml @@ -24,10 +24,10 @@ dependencies: dev_dependencies: # TODO(https://github.com/flutter/devtools/issues/9771): Update to published version - dart_skills_lint: - git: - url: https://github.com/flutter/skills - path: tool/dart_skills_lint - ref: 05e5a45fa412ddbdd1d694eee0c71f4bbaea2617 logging: ^1.1.1 + skills_lint: + git: + url: https://github.com/google/skills_lint.dart.git + path: packages/skills_lint + ref: main test: ^1.25.8 diff --git a/tool/dart_skills_lint.yaml b/tool/skills_lint.yaml similarity index 95% rename from tool/dart_skills_lint.yaml rename to tool/skills_lint.yaml index 150e3900d15..14fbb78e053 100644 --- a/tool/dart_skills_lint.yaml +++ b/tool/skills_lint.yaml @@ -1,7 +1,7 @@ # Copyright 2026 The Flutter Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd. -dart_skills_lint: +skills_lint: rules: check-relative-paths: error check-absolute-paths: error diff --git a/tool/test/validate_skills_test.dart b/tool/test/validate_skills_test.dart index 04736e7c4b2..6adbabe61c4 100644 --- a/tool/test/validate_skills_test.dart +++ b/tool/test/validate_skills_test.dart @@ -3,11 +3,12 @@ // found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd. import 'dart:async'; -import 'package:dart_skills_lint/dart_skills_lint.dart'; + import 'package:logging/logging.dart'; +import 'package:skills_lint/skills_lint.dart'; import 'package:test/test.dart'; -const String _configFilePath = 'dart_skills_lint.yaml'; +const String _configFilePath = 'skills_lint.yaml'; void main() { test('Validate DevTools Skills', () async { From 21175edf3bd636b298bcae4130d87838223798eb Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Fri, 7 Aug 2026 12:31:31 -0400 Subject: [PATCH 2/3] Revert unintended analysis_options.yaml modifications --- analysis_options.yaml | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index efba7da936b..f219cfddeae 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -18,25 +18,6 @@ analyzer: - '**/build/**' - '**.freezed.dart' - tool/flutter-sdk/ - - '**/lib/generated_plugin_registrant.dart' - - '**/android/**' - - '**/ios/**' - - '**/web/**' - - '**/windows/**' - - '**/macos/**' - - '**/linux/**' - # Syntax highlighting test files may include or lint-violating code - # for testing so should be ignored. Uncomment this while modifying - # these files if you want to ensure code is not invalid except where - # expected. - - packages/devtools_app/test/test_infra/test_data/syntax_highlighting/** - - build/** - - android/** - - ios/** - - web/** - - windows/** - - macos/** - - linux/** linter: rules: @@ -168,21 +149,13 @@ linter: - valid_regexps # - void_checks # not yet tested -dcm: +dart_code_metrics: metrics: cyclomatic-complexity: 20 number-of-parameters: 4 maximum-nesting-level: 5 - exclude: - dependencies: - - "**/packages/devtools_extensions/example/**" - metrics: - - packages/devtools_app/test/test_infra/test_data/** - unused-code: - # This fixture has unused code for testing the debugger. - - packages/devtools_app/test/test_infra/fixtures/flutter_app/** - # Ignore unused code in package examples. - - packages/devtools_app_shared/example/** + metrics-exclude: + - test/** rules: # - arguments-ordering Too strict # - avoid-banned-imports # TODO(polina-c): add configuration @@ -213,8 +186,6 @@ dcm: - avoid-explicit-type-declaration # - ban-name # TODO(polina-c): add configuration # - binary-expression-operand-order Some nice catches but too many false positives to enable. - - dispose-class-fields - - dispose-fields - double-literal-format # - format-comment TODO(jacobr): enable this one after fixing violations. # TODO(jacobr): enable member-ordering. This catches a bunch of real style From a8883cbe9d19f10063717d2dbcab7e43683970bd Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Fri, 7 Aug 2026 12:35:52 -0400 Subject: [PATCH 3/3] Fix: Restore analysis_options.yaml to upstream/master state --- analysis_options.yaml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index f219cfddeae..207a8e959bb 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -18,6 +18,18 @@ analyzer: - '**/build/**' - '**.freezed.dart' - tool/flutter-sdk/ + - '**/lib/generated_plugin_registrant.dart' + - '**/android/**' + - '**/ios/**' + - '**/web/**' + - '**/windows/**' + - '**/macos/**' + - '**/linux/**' + # Syntax highlighting test files may include or lint-violating code + # for testing so should be ignored. Uncomment this while modifying + # these files if you want to ensure code is not invalid except where + # expected. + - packages/devtools_app/test/test_infra/test_data/syntax_highlighting/** linter: rules: @@ -149,13 +161,21 @@ linter: - valid_regexps # - void_checks # not yet tested -dart_code_metrics: +dcm: metrics: cyclomatic-complexity: 20 number-of-parameters: 4 maximum-nesting-level: 5 - metrics-exclude: - - test/** + exclude: + dependencies: + - "**/packages/devtools_extensions/example/**" + metrics: + - packages/devtools_app/test/test_infra/test_data/** + unused-code: + # This fixture has unused code for testing the debugger. + - packages/devtools_app/test/test_infra/fixtures/flutter_app/** + # Ignore unused code in package examples. + - packages/devtools_app_shared/example/** rules: # - arguments-ordering Too strict # - avoid-banned-imports # TODO(polina-c): add configuration @@ -186,6 +206,8 @@ dart_code_metrics: - avoid-explicit-type-declaration # - ban-name # TODO(polina-c): add configuration # - binary-expression-operand-order Some nice catches but too many false positives to enable. + - dispose-class-fields + - dispose-fields - double-literal-format # - format-comment TODO(jacobr): enable this one after fixing violations. # TODO(jacobr): enable member-ordering. This catches a bunch of real style