Giter Club home page Giter Club logo

Comments (6)

amimas avatar amimas commented on June 23, 2024 1

Thanks for the quick reply @staticdev .

For scanning files recursively in a directory, I'm now using find -name '*.toml' -type f -exec toml-validator {} \;. This will go through every .toml files in current directory and sub-directories and then execute toml-validator on that file.

For me, one of the top benefit of having a linter is to be able to use it in a CI pipeline so that we can catch issues before merging any changes. I like toml-validator. It's simple to setup and use. But I think this is lacking a lot of features. The above is simply a work-around. The linter needs to be able to handle directories on it's own. Otherwise, reporting is going to be on individual files. Speaking which, the linter currently does not have any reporting capabilities (i.e. junit, html, etc.); it simply prints a line in stdout. Also the linter does not quit with a non-zero exit code if it found any issues. That means, if I have a GitHub actions or travis pipeline where I run this for each PR, it won't mark the pipeline as failed. Also, it'd be nice if we could configure the expected schema of toml files (i.e. what keys are valid or invalid). That would make it even more advanced and the linter could be used for advanced validation; not just syntax checking.

I'm listing a lot in this comment. Thought I'd summarize it here.

Thanks for creating it though. It's still useful. 🙏

from toml-validator.

staticdev avatar staticdev commented on June 23, 2024 1

@amimas I really liked your feedback. I will share the new repo with you and the recursive folder and we can try together these new improvements.

from toml-validator.

staticdev avatar staticdev commented on June 23, 2024

@amimas I am creating another repo for this application with a more broad scope (it will also lint other extensions of files). It will have recursive option. I update this issue afterwards.

from toml-validator.

staticdev avatar staticdev commented on June 23, 2024

@amimas just a quick heads-up. I created version 1.4.0 with different exit code for errors:

Return status:
* 0: no errors found
* 1: incorrect usage
* 2: invalid path
* 3: errors found

This one was very easy to implement.

from toml-validator.

staticdev avatar staticdev commented on June 23, 2024

@amimas I would able to address most of your suggestions on version 1.5.0. Give it a try.

from toml-validator.

amimas avatar amimas commented on June 23, 2024

Thanks @staticdev . I'll try out the new version as early as I can.

from toml-validator.

Related Issues (20)

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.