@@ -281,7 +281,8 @@ func TestReadConfigsJSON(t *testing.T) {
281
281
"included_paths": ["path_a"],
282
282
"excluded_paths": ["path_b"],
283
283
"disabled_rules": ["rule_a", "rule_b"],
284
- "enabled_rules": ["rule_c", "rule_d"]
284
+ "enabled_rules": ["rule_c", "rule_d"],
285
+ "import_paths": ["import_a", "import_b"]
285
286
}
286
287
]
287
288
`
@@ -297,6 +298,7 @@ func TestReadConfigsJSON(t *testing.T) {
297
298
ExcludedPaths : []string {"path_b" },
298
299
DisabledRules : []string {"rule_a" , "rule_b" },
299
300
EnabledRules : []string {"rule_c" , "rule_d" },
301
+ ImportPaths : []string {"import_a" , "import_b" },
300
302
},
301
303
}
302
304
if ! reflect .DeepEqual (configs , expected ) {
@@ -317,7 +319,8 @@ func TestReadConfigsYAMLFormatError(t *testing.T) {
317
319
"included_paths": ["path_a"],
318
320
"excluded_paths": ["path_b"],
319
321
"disabled_rules": ["rule_a", "rule_b"],
320
- "enabled_rules": ["rule_c", "rule_d"]
322
+ "enabled_rules": ["rule_c", "rule_d"],
323
+ "import_paths": ["import_a", "import_b"]
321
324
}
322
325
`
323
326
@@ -339,6 +342,9 @@ func TestReadConfigsYAML(t *testing.T) {
339
342
enabled_rules:
340
343
- 'rule_c'
341
344
- 'rule_d'
345
+ import_paths:
346
+ - 'import_a'
347
+ - 'import_b'
342
348
`
343
349
344
350
configs , err := ReadConfigsYAML (strings .NewReader (content ))
@@ -352,6 +358,7 @@ func TestReadConfigsYAML(t *testing.T) {
352
358
ExcludedPaths : []string {"path_b" },
353
359
DisabledRules : []string {"rule_a" , "rule_b" },
354
360
EnabledRules : []string {"rule_c" , "rule_d" },
361
+ ImportPaths : []string {"import_a" , "import_b" },
355
362
},
356
363
}
357
364
if ! reflect .DeepEqual (configs , expected ) {
@@ -366,6 +373,7 @@ func TestReadConfigsFromFile(t *testing.T) {
366
373
ExcludedPaths : []string {"path_b" },
367
374
DisabledRules : []string {"rule_a" , "rule_b" },
368
375
EnabledRules : []string {"rule_c" , "rule_d" },
376
+ ImportPaths : []string {"import_a" , "import_b" },
369
377
},
370
378
}
371
379
@@ -375,7 +383,8 @@ func TestReadConfigsFromFile(t *testing.T) {
375
383
"included_paths": ["path_a"],
376
384
"excluded_paths": ["path_b"],
377
385
"disabled_rules": ["rule_a", "rule_b"],
378
- "enabled_rules": ["rule_c", "rule_d"]
386
+ "enabled_rules": ["rule_c", "rule_d"],
387
+ "import_paths": ["import_a", "import_b"]
379
388
}
380
389
]
381
390
`
@@ -394,6 +403,9 @@ func TestReadConfigsFromFile(t *testing.T) {
394
403
enabled_rules:
395
404
- 'rule_c'
396
405
- 'rule_d'
406
+ import_paths:
407
+ - 'import_a'
408
+ - 'import_b'
397
409
`
398
410
yamlConfigsFile := createTempFile (t , "test.yaml" , yamlConfigsText )
399
411
defer os .Remove (yamlConfigsFile )
0 commit comments