Comments (6)
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.
@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.
@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.
@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.
@amimas I would able to address most of your suggestions on version 1.5.0. Give it a try.
from toml-validator.
Thanks @staticdev . I'll try out the new version as early as I can.
from toml-validator.
Related Issues (20)
- Add pygments for tests session
- Fix coverage session
- Typeguard enforcement
- Strict mypy
- Create ReadTheDocs documentation
- Improve codecov configs
- pipefail release
- Flake8 / pre-commit / nox review
- Ignore VSCode and Pycharm settings
- Migrate darglint configuration to .flake8
- Update contributing
- Refactor Nox sessions
- Update pre-commit prettier
- Update Prettier pre-commit hook to new repo
- Change to standalone build backend (PEP-517)
- Add GitHub Labeler Action to manage project labels
- Add `help-wanted` to Release Drafter
- New maintainer needed
- Use Nox types in mypy session
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toml-validator.