Вопрос

I have some custom content (like configuration files) that I'd like to check for common errors. These files may be based on XML, JSON or some other standard data type, or they could be their own custom format. I would like to scan these files for common errors, in much the same way as I would use CheckStyle against Java or JSLint against JavaScript.

Are there any open source libraries that would allow me to create my own lint style application to check custom inputs?

Это было полезно?

Решение

For creating custom checkers for XML, you can implement the com.android.tools.lint.detector.api.Detector.XmlScanner interface present in the com.android.tools.lint.detector.api.Detector class. You should also extend the Detector class. Here is the source of the Detector class.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top