File tree 1 file changed +2
-17
lines changed
1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -16,22 +16,7 @@ import 'package:dart_lint/src/rules.dart';
16
16
import 'package:path/path.dart' as p;
17
17
import 'package:unittest/unittest.dart' ;
18
18
19
- Directory get ruleDir {
20
-
21
- print ('CWD: ${Directory .current .path }' );
22
- print ('CWD: ${Directory .current .absolute .path }' );
23
-
24
- Directory dir = new Directory ('test/rules' );
25
- if (dir.existsSync ()) {
26
- return dir;
27
- }
28
-
29
- Directory testDir = new File (Platform .script.path).parent;
30
- Directory rulesDir = new Directory (testDir.path + '/rules' );
31
-
32
- print ('trying... ${rulesDir .absolute .path }' );
33
- return rulesDir;
34
- }
19
+ const String ruleDir = 'test/rules' ;
35
20
36
21
/// Linter engine tests
37
22
void defineLinterEngineTests () {
@@ -132,7 +117,7 @@ void defineRuleTests() {
132
117
133
118
//TODO: if ruleDir cannot be found print message to set CWD to project root
134
119
group ('rule' , () {
135
- for (var entry in ruleDir.listSync ()) {
120
+ for (var entry in new Directory ( ruleDir) .listSync ()) {
136
121
if (entry is ! File || ! entry.path.endsWith ('.dart' )) continue ;
137
122
var ruleName = p.basenameWithoutExtension (entry.path);
138
123
testRule (ruleName, entry);
You can’t perform that action at this time.
0 commit comments