From bf7e3200cb1607644d58b2ab16b07ae0293fa70e Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Thu, 14 May 2026 11:32:29 -0400 Subject: [PATCH 1/2] Update dart_skills_lint dependency to e449787 and optimize skills validation test --- dev/tools/dart_skills_lint.yaml | 10 ++++++++++ dev/tools/pubspec.yaml | 2 +- dev/tools/test/validate_skills_test.dart | 22 +++++++++++++--------- pubspec.lock | 6 +++--- 4 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 dev/tools/dart_skills_lint.yaml diff --git a/dev/tools/dart_skills_lint.yaml b/dev/tools/dart_skills_lint.yaml new file mode 100644 index 0000000000000..3026701f87236 --- /dev/null +++ b/dev/tools/dart_skills_lint.yaml @@ -0,0 +1,10 @@ +# 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. +dart_skills_lint: + rules: + check-relative-paths: error + check-absolute-paths: error + check-trailing-whitespace: error + directories: + - path: ".agents/skills" diff --git a/dev/tools/pubspec.yaml b/dev/tools/pubspec.yaml index f8ef9fd24fcb9..515bc9dd3a5a7 100644 --- a/dev/tools/pubspec.yaml +++ b/dev/tools/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: git: url: https://github.com/flutter/skills path: tool/dart_skills_lint - ref: 9eff6bbcfa27c2724ea9ad67a611c19fe77057ea + ref: e4497873950727ee781fa411c1a2f624b1ec50c6 logging: ^1.3.0 dev_dependencies: diff --git a/dev/tools/test/validate_skills_test.dart b/dev/tools/test/validate_skills_test.dart index 0cbcc0cd29973..6721a46ae1987 100644 --- a/dev/tools/test/validate_skills_test.dart +++ b/dev/tools/test/validate_skills_test.dart @@ -11,6 +11,8 @@ import 'package:test/test.dart'; import 'check_backticks_relative_paths_rule.dart'; +const String _configFilePath = 'dev/tools/dart_skills_lint.yaml'; + Directory _findSkillsDir() { Directory dir = Directory.current; while (dir.path != dir.parent.path) { @@ -47,14 +49,8 @@ void main() { }); test('Validate Flutter Skills', () async { - final bool isValid = await validateSkills( - skillDirPaths: [skillsDirectory], - resolvedRules: { - 'check-relative-paths': AnalysisSeverity.error, - 'check-absolute-paths': AnalysisSeverity.error, - 'check-trailing-whitespace': AnalysisSeverity.error, - }, - ); + final Configuration config = await ConfigParser.loadConfig(path: _configFilePath); + final bool isValid = await validateSkills(skillDirPaths: [skillsDirectory], config: config); expect(isValid, isTrue, reason: 'Skills validation failed. See above for details.'); }); @@ -85,7 +81,15 @@ void main() { final bool isValid = await validateSkills( skillDirPaths: [skillsDirectory], customRules: [CheckBackticksRelativePathsRule(valid2SegmentPaths, repoRoot.path)], - resolvedRules: {'check-absolute-paths': AnalysisSeverity.disabled}, + resolvedRules: { + 'check-absolute-paths': AnalysisSeverity.disabled, + 'check-relative-paths': AnalysisSeverity.disabled, + 'check-trailing-whitespace': AnalysisSeverity.disabled, + 'description-too-long': AnalysisSeverity.disabled, + 'disallowed-field': AnalysisSeverity.disabled, + 'invalid-skill-name': AnalysisSeverity.disabled, + 'valid-yaml-metadata': AnalysisSeverity.disabled, + }, ); expect(isValid, isTrue, reason: 'Skills validation failed. See above for details.'); }); diff --git a/pubspec.lock b/pubspec.lock index 07704de1f6392..6d11957cc426d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -238,11 +238,11 @@ packages: dependency: transitive description: path: "tool/dart_skills_lint" - ref: "9eff6bbcfa27c2724ea9ad67a611c19fe77057ea" - resolved-ref: "9eff6bbcfa27c2724ea9ad67a611c19fe77057ea" + ref: e4497873950727ee781fa411c1a2f624b1ec50c6 + resolved-ref: e4497873950727ee781fa411c1a2f624b1ec50c6 url: "https://github.com/flutter/skills" source: git - version: "0.2.0" + version: "0.3.0" dart_style: dependency: "direct main" description: From dc51524c1787a9f4c28e2b2244a4663e91c1f49c Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Thu, 14 May 2026 15:07:52 -0400 Subject: [PATCH 2/2] Fix configuration path resolution in CI presubmit context --- dev/tools/test/validate_skills_test.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/tools/test/validate_skills_test.dart b/dev/tools/test/validate_skills_test.dart index 6721a46ae1987..ce0262b7183a8 100644 --- a/dev/tools/test/validate_skills_test.dart +++ b/dev/tools/test/validate_skills_test.dart @@ -11,7 +11,7 @@ import 'package:test/test.dart'; import 'check_backticks_relative_paths_rule.dart'; -const String _configFilePath = 'dev/tools/dart_skills_lint.yaml'; +const String _configFileName = 'dart_skills_lint.yaml'; Directory _findSkillsDir() { Directory dir = Directory.current; @@ -49,7 +49,9 @@ void main() { }); test('Validate Flutter Skills', () async { - final Configuration config = await ConfigParser.loadConfig(path: _configFilePath); + final Configuration config = await ConfigParser.loadConfig( + path: path.join(repoRoot.path, 'dev', 'tools', _configFileName), + ); final bool isValid = await validateSkills(skillDirPaths: [skillsDirectory], config: config); expect(isValid, isTrue, reason: 'Skills validation failed. See above for details.'); });