@@ -281,7 +281,8 @@ func TestReadConfigsJSON(t *testing.T) {
281281 "included_paths": ["path_a"],
282282 "excluded_paths": ["path_b"],
283283 "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"]
285286 }
286287 ]
287288 `
@@ -297,6 +298,7 @@ func TestReadConfigsJSON(t *testing.T) {
297298 ExcludedPaths : []string {"path_b" },
298299 DisabledRules : []string {"rule_a" , "rule_b" },
299300 EnabledRules : []string {"rule_c" , "rule_d" },
301+ ImportPaths : []string {"import_a" , "import_b" },
300302 },
301303 }
302304 if ! reflect .DeepEqual (configs , expected ) {
@@ -317,7 +319,8 @@ func TestReadConfigsYAMLFormatError(t *testing.T) {
317319 "included_paths": ["path_a"],
318320 "excluded_paths": ["path_b"],
319321 "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"]
321324 }
322325 `
323326
@@ -339,6 +342,9 @@ func TestReadConfigsYAML(t *testing.T) {
339342 enabled_rules:
340343 - 'rule_c'
341344 - 'rule_d'
345+ import_paths:
346+ - 'import_a'
347+ - 'import_b'
342348`
343349
344350 configs , err := ReadConfigsYAML (strings .NewReader (content ))
@@ -352,6 +358,7 @@ func TestReadConfigsYAML(t *testing.T) {
352358 ExcludedPaths : []string {"path_b" },
353359 DisabledRules : []string {"rule_a" , "rule_b" },
354360 EnabledRules : []string {"rule_c" , "rule_d" },
361+ ImportPaths : []string {"import_a" , "import_b" },
355362 },
356363 }
357364 if ! reflect .DeepEqual (configs , expected ) {
@@ -366,6 +373,7 @@ func TestReadConfigsFromFile(t *testing.T) {
366373 ExcludedPaths : []string {"path_b" },
367374 DisabledRules : []string {"rule_a" , "rule_b" },
368375 EnabledRules : []string {"rule_c" , "rule_d" },
376+ ImportPaths : []string {"import_a" , "import_b" },
369377 },
370378 }
371379
@@ -375,7 +383,8 @@ func TestReadConfigsFromFile(t *testing.T) {
375383 "included_paths": ["path_a"],
376384 "excluded_paths": ["path_b"],
377385 "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"]
379388 }
380389 ]
381390 `
@@ -394,6 +403,9 @@ func TestReadConfigsFromFile(t *testing.T) {
394403 enabled_rules:
395404 - 'rule_c'
396405 - 'rule_d'
406+ import_paths:
407+ - 'import_a'
408+ - 'import_b'
397409`
398410 yamlConfigsFile := createTempFile (t , "test.yaml" , yamlConfigsText )
399411 defer os .Remove (yamlConfigsFile )
0 commit comments