mirror of
https://github.com/flutter/agent-plugins.git
synced 2026-09-14 16:19:33 +08:00
35 lines
1.0 KiB
Dart
35 lines
1.0 KiB
Dart
// Copyright (c) 2026, 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.
|
|
|
|
import 'package:dart_skills_lint/dart_skills_lint.dart';
|
|
import 'package:logging/logging.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
import 'custom_skill_rules/last_modified_rule.dart';
|
|
|
|
void main() {
|
|
test('Run skills linter', () async {
|
|
Logger.root.level = Level.ALL;
|
|
final subscription = Logger.root.onRecord.listen((record) {
|
|
printOnFailure('${record.level.name}: ${record.message}');
|
|
});
|
|
|
|
try {
|
|
expect(
|
|
await validateSkills(
|
|
skillDirPaths: ['../../skills'],
|
|
resolvedRules: {
|
|
'check-relative-paths': AnalysisSeverity.error,
|
|
'check-absolute-paths': AnalysisSeverity.error,
|
|
},
|
|
customRules: [LastModifiedRule()],
|
|
),
|
|
isTrue,
|
|
);
|
|
} finally {
|
|
await subscription.cancel();
|
|
}
|
|
});
|
|
}
|