wofsauge / isaac-xml-validator Goto Github PK
View Code? Open in Web Editor NEWA collection of XSD files used to validate XML files of the game "The Binding of Isaac: Rebirth"
License: MIT License
A collection of XSD files used to validate XML files of the game "The Binding of Isaac: Rebirth"
License: MIT License
I use GitLab, so I can't really drop this straight into my CI. I could theoretically build the image myself and upload it to my repository's container registry, but I was wondering if an official docker image could be uploaded to the Docker Hub so that I can just drop it straight in, and not have to re-build it if it updates?
Thanks
since it will be auto id assigned
i think
flags should take precedence
In my mod, I delete all cutscenes via editing "cutscenes.xml" and deleting all of the content in it. However, this causes isaac-xml-validator
to fail. Thus, I need the ability to tell isaac-xml-validator
to ignore this specific file.
I can think of two different ways to accomplish this, and I think the tool should support both of them to be as robust as possible.
--ignore
Command Line Flagisaac-xml-validator
should support a --ignore
command line flag, so that you could run it like this:
isaac-xml-validator --ignore cutscenes.xml
It should also support multiple values via splitting on commas. That would allow end-users to ignore multiple files like this:
isaac-xml-validator --ignore cutscenes.xml,entities2.xml
isaac-xml-validator:disable
CommentCSpell is a popular command-line program very similar to isaac-xml-validator
. You run it on your repository, and it recursively looks through everything for spelling errors.
However, some files in a repository do not need to be spell checked, like log files. In these kinds of situations, you can bake in comments that cause the parser to skip the file like this:
<!-- cspell:disable -->
[rest of file content here]
Thus, I propose that isaac-xml-validator
does the same thing:
<!-- isaac-xml-validator:disable -->
[rest of file content here]
A wrinkle here: XML parsing does not include comments AFAIK, so as a quick implementation the script can just look at the first line of the file to see if it has a matching disable comment.
We want to use this tool as a pip package as well to make stuff easier.
for the python script specifically
<?xml-model href="https://wofsauge.github.io/isaac-xml-validator/xsd/entities2.xsd" ?>
<entities anm2root="gfx/" version="5" deathanm2="gfx/death enemies.anm2">
</entities>
-->
cvc-complex-type.3.2.2: Attribute 'deathanm2' is not allowed to appear in element 'entities'.
This flag would suppress all output unless the output signifies an actual error.
This is useful to make the tool similar to other command-line linters, such as ESLint and CSpell, which output nothing at all upon success.
Additionally, we should have --silent
work as a synonym.
we need to ignore node_modules because end-users will get spurious errors for their deps otherwise when they simply run isaac-xml-validator
with no other arguments
see this commit and the related ci output: Zamiell/racing-plus@5417421
<?xml-model href="https://wofsauge.github.io/isaac-xml-validator/xsd/sounds.xsd" ?>
<sounds root="sfx/">
<sound name="ShankerBritish">
<sample weight="1" path="shanker2.wav" />
<sample weight="0.3" path="shanker1.wav" />
</sound>
</sounds>
-->
Content of type 'integer' is expected.
The following content is not a valid type:
'0.3'
Code:
cvc-attribute.3: The value '0.3' of attribute 'weight' on element 'sample' is not valid with respect to its type, 'unsignedInt'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.