Skip to content
Draft
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
4 changes: 2 additions & 2 deletions .agents/scripts/validate_skills_hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ TARGET_FILE=$(echo "$INPUT" | python3 -c "import sys, json; data=json.load(sys.s
# Check if a skill file was modified
if [[ "$TARGET_FILE" == *"SKILL.md"* ]] || [[ "$TARGET_FILE" == *".agents/skills"* ]]; then
echo "Skill edit detected: $TARGET_FILE" >&2
echo "Running dart_skills_lint..." >&2
echo "Running skills_lint..." >&2

# Run the skills linter from tool/ directory
(cd tool && dart run dart_skills_lint:cli)
(cd tool && flutter pub run skills_lint)
fi

# PostToolUse expects an empty JSON object on stdout
Expand Down
13 changes: 8 additions & 5 deletions .agents/skills/adding-release-notes/scripts/add_note.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void main(List<String> args) {
final note = args[1].trim();
final pr = args[2].trim();

final prLink = pr == 'TODO'
final prLink = pr == 'TODO'
? '[TODO](https://github.com/flutter/devtools/pull/TODO)'
: '[#$pr](https://github.com/flutter/devtools/pull/$pr)';

Expand Down Expand Up @@ -52,15 +52,18 @@ void main(List<String> args) {
// Find the next section start or the end of the file.
var nextSectionStart = content.indexOf('\n## ', sectionStart + 1);
if (nextSectionStart == -1) {
nextSectionStart =
content.indexOf('\n# Full commit history', sectionStart + 1);
nextSectionStart = content.indexOf(
'\n# Full commit history',
sectionStart + 1,
);
}
if (nextSectionStart == -1) {
nextSectionStart = content.length;
}

var sectionContent =
content.substring(sectionStart, nextSectionStart).trimRight();
var sectionContent = content
.substring(sectionStart, nextSectionStart)
.trimRight();
sectionContent += '\n$newEntry';

content =
Expand Down
18 changes: 9 additions & 9 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.0.3"
dart_skills_lint:
dependency: transitive
description:
path: "tool/dart_skills_lint"
ref: "05e5a45fa412ddbdd1d694eee0c71f4bbaea2617"
resolved-ref: "05e5a45fa412ddbdd1d694eee0c71f4bbaea2617"
url: "https://github.com/flutter/skills"
source: git
version: "0.4.0"
dart_style:
dependency: transitive
description:
Expand Down Expand Up @@ -758,6 +749,15 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.0"
skills_lint:
dependency: transitive
description:
path: "packages/skills_lint"
ref: e6e695e1550f81342fe5acd4dbe65040b5aa44c3
resolved-ref: e6e695e1550f81342fe5acd4dbe65040b5aa44c3
url: "https://github.com/google/skills_lint.dart.git"
source: git
version: "0.5.1"
sky_engine:
dependency: transitive
description: flutter
Expand Down
10 changes: 5 additions & 5 deletions tool/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ dependencies:
yaml: ^3.1.2

dev_dependencies:
logging: ^1.1.1
# TODO(https://github.com/flutter/devtools/issues/9771): Update to published version
dart_skills_lint:
skills_lint:
git:
url: https://github.com/flutter/skills
path: tool/dart_skills_lint
ref: 05e5a45fa412ddbdd1d694eee0c71f4bbaea2617
logging: ^1.1.1
url: https://github.com/google/skills_lint.dart.git
path: packages/skills_lint
ref: e6e695e1550f81342fe5acd4dbe65040b5aa44c3
test: ^1.25.8
2 changes: 1 addition & 1 deletion tool/dart_skills_lint.yaml → tool/skills_lint.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions tool/test/validate_skills_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading