Add support for non-standard rule 'ignore'.

This commit is contained in:
Amy Boyd
2016-12-22 14:20:41 +00:00
parent 67e51c079a
commit 6a2c768176
4 changed files with 20 additions and 2 deletions

View File

@@ -32,3 +32,16 @@ func TestGetRulesToApplyToSourcePathWhenNoRulesShouldApply(t *testing.T) {
t.Error("No rules should be applied for the file")
}
}
func TestGetRulesToApplyToSourcePathWhenPathShouldBeIgnored(t *testing.T) {
result := GetRulesToApplyToSourcePath(
"some-file-to-ignore.ignored",
[]ConfigFile{
CreateConfigFileStruct("tests/.editorconfig"),
},
)
if len(result) != 0 {
t.Error("No rules should be applied for the file")
}
}