Skip to content

Commit 90a987a

Browse files
committed
separate test case file + several declarations added
1 parent 56c400e commit 90a987a

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
analyzer:
2+
plugins:
3+
- ../../custom_lint
4+
5+
custom_lint:
6+
rules:
7+
- prefer_match_file_name:
8+
exclude_entity:
9+
- extension
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// ignore_for_file: unused_element, unused_field
2+
3+
/// `prefer_match_file_name` rule will be ignored by this extension because of
4+
/// exclude_entity:
5+
/// - extension
6+
/// in analysis_options.yaml
7+
extension DefaultExtension on String {}
8+
9+
// expect_lint: prefer_match_file_name
10+
abstract class WrongNamedClass {}
11+
12+
/// Only first public element declaration is checked
13+
class PreferMatchFileNameIgnoreExtensions {}

lint_test/pubspec.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ dependencies:
99
flutter:
1010
sdk: flutter
1111

12+
custom_lint: ^0.7.5
13+
1214
dev_dependencies:
1315
solid_lints:
1416
path: ../

0 commit comments

Comments
 (0)