It should be cool if we could have an utility method validate which waits a String content of an editorconfig and throws ParsingException when this content is not well formatted:
public class EditorConfig {
....
public void validate(String editorConfigContent) throws ParsingException {
// here parse editorConfigContent and throws ParsingException with line/column, offset info
}
}
Here a sample with miss of close of [ for section names:
[*]
charset = utf-8
[*.md // <- here there is an error because section is not closed
The exception ParsingException should contains offset and line/column info where there is an error.
With this utility method validate, any IDE could support validation with marker.
Many thanks!