-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idea: Show line number in source on error #33
Comments
Just to be sure what you mean, do you just want to supress the tracebacks on validation error and keep all other output? Or do you want to supress all output, you can do this with When showing line numbers, where exactly do you want it? I do not really run the original kwalify so i can't see where it shows line numbers :] |
Yes, I'd like to have the option to suppress (or permit?) tracebacks specifically and keep other output. As for the line numbers, see this example. Both of these would be a big help with user experience. If I can figure out the needed changes and issue a pull request, I'll be happy to do that too, but I wanted to ask first in case I'd be reinventing the wheel. Also: pykwalify has functionality kwalify doesn't (which I also like). :) |
To supress the traceback is something that is really easy to implement if The linenumber thing i am not so sure about how to implement because i am not aware of any support inside pyyaml to determine what line any key/value is sourced from. It would have to be investigated further if this is possible in pyyaml. |
Ah, sounds good, and understood about the linenumber thing. Honestly, for me, the path is plenty. For folks who are used to going to line X and fixing something, then it becomes problematic, and that's where I'm trying to see if there's a way to do that. I imagine it's not trivial. Keep it as a wish list item, perhaps? Not urgent, and maybe I'll be able to help figure it out. For the traceback suppression, I just realized a workaround, redirect stderr to /dev/null! :) |
I changed the title of this and keep is as an idea. If i find some way to do this in a way that is not too complicated, i will give it a shot. |
Is there a way to show line numbers (as kwalify does) and suppress traceback when validating using the CLI?
The text was updated successfully, but these errors were encountered: