Giter Club home page Giter Club logo

isaac-xml-validator's People

Contributors

opensauce04 avatar wofsauge avatar zamiell avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

opensauce04

isaac-xml-validator's Issues

Docker Hub version?

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

Support for ignore comment / ignore flag

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.

1) --ignore Command Line Flag

isaac-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

2) isaac-xml-validator:disable Comment

CSpell 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.

entities2.xml + deathanm2 bug

<?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'.

--quiet flag

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.

weight is a float

<?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'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.