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