New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we have an xsd for the checkstyle configuration xml file ? #7517
Comments
@romani any ideas around this ? |
Yes, idea to migrate to xsd was around for very long time, but nobody actually willing to start this process.
NO.
No, merge of configs is very complicated concept, we do not know how to make it for now.
please explain why, we do such DTD by our code and by maven plugs to validate xml files. Here is example on how users hacking config file to have it more modular (specific config for specific project) - #3605 if you end up in creation of xsd files (based on our DTD), please contribute them to checkstyle. |
issue is not complete, if no activity happened till end of February, issue will be closed. |
huh, doesn't look closed, I just came wondering if this existed, would be good for autocompletion in IDE's |
@xenoterracide , which IDE you use ? |
Intellij, I guess it's suggesting tags, but not the values of properties. |
good point to know ... yes I agree it would be cool. But current DTD is stable for very long time. All DTDs are downloadable by URL, as we have small amount of them it is manageable, with XSDs for each checkstyle version, amount will be significant, and users need update version of XSD each time they update checkstyle. I am not sure final result cost all efforts to make it happen. |
xsd's are downloadable and you can point them at something like a latest url |
We releasing very frequently(each month), most users use very old versions. |
Use Case :
I'm planning to introduce custom checks for multiple users, in which each project owner can define their own set of checks. I also have a set of default set of checks that needs to run for every project. During the run time of Checkstyle, I want to merge the project specific checks and the default checks. Having a XSD can help me validate if the merged XML configuration file is formed correctly or not.
Since some of the checks go inside of the Checker module and many checks go inside the TreeWalker module, we need to correctly place the checks, so that the run doesn't fail at all after creating a wrong merged XML.
Question :
Is there any XSD available for validating ? Or may be an API within Checkstyle which can do the merge ?
I've seen the DTD that is present, but that doesn't help in completely validating the entire configuration file.
The text was updated successfully, but these errors were encountered: