Comments (8)
Sorry, did I say the next couple of hours? I meant minutes! 😅
(The fix and testing for it came together surprisingly easily.)
v0.18.2 is now available with the fix. Please give it a go and let me know if it still isn't working for any reason!
from check-jsonschema.
Works perfectly fine! Thanks so much for the quick replies, this is the most usable tool of all yaml/json linters/checkers for use in a git hook.
from check-jsonschema.
That sounds like a reasonable use-case and a good improvement to the behavior! Consider this "accepted" -- I'll try to find time to work on this.
from check-jsonschema.
I've just released v0.18.0, which changes the way that parsing errors are handled to accommodate this.
The error output has changed slightly, and it should no longer stop processing when a file fails to parse.
I hope this works well for you. Let me know if you run into issues with it!
from check-jsonschema.
Thank you so much! It works very well for JSON, but invalid YAML files still crash the tool, unfortunately. They crash with a ScannerError
, which seems like is not being caught in the code yet.
from check-jsonschema.
Can you provide me with a sample YAML file which crashes things in this way? I tested against YAML and other formats, so it's supposed to work, but I guess I'm missing some case(s).
from check-jsonschema.
For example:
foo: bar
invalid
from check-jsonschema.
Thanks for the example! I'm able to reproduce and I see the cause.
The current code catches ruamel.yaml.ParserError
, but that only refers to errors during the parse phase of YAML loading. The above produces a ScannerError
(IIRC "scanning" is tokenization/lexing).
I should probably broaden the error class to the base YAMLError
. I expect to have a fix done, tested, and released within the next couple of hours.
from check-jsonschema.
Related Issues (20)
- Allow optionally interpreting .json files as JSON5 HOT 4
- Failure resolving ref to anchor within same schema after v0.24.0 HOT 5
- Support new GitHub Actions Runner Scale Sets HOT 2
- Opening concurrent file handles for all instancefiles risks breaching OS limit. HOT 6
- Support ECMAScript unicode-mode RegExp usage for 'pattern' and 'patternProperties' HOT 3
- [BUG] `github-workflows-require-timeout.json`: `timeout-minutes` should allow expressions HOT 4
- Feature request: add line numbers to the output HOT 3
- Update vendored bitbucket schema HOT 1
- Feature request: add file names to the ouptut even if validation is OK HOT 3
- "unexpected keyword argument 'registry'" when validating specific GitHub workflow HOT 4
- Bug: Globs work in my machine but fails on CI HOT 3
- AttributeError not parsing schema correctly. HOT 2
- Cannot validate date-time via the CLI tool HOT 4
- Distribute the check-jsonschema tool in a manner which does not assume a Python environment
- Validation passes for misspelled optional child properties in Google Cloud Build schema HOT 7
- check-gitlab-ci: coverage is not a regex HOT 9
- Check yaml with check-metaschema option HOT 3
- Non-JSON files ignored despite --default-type being set HOT 4
- check-azure-pipelines: doesn't handle default value for boolean parameter properly HOT 2
- --schemafile from $schema HOT 1
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 check-jsonschema.