Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the YAML CPAN distribution.

Report information
The Basics
Id: 53828
Status: resolved
Priority: 0/
Queue: YAML

People
Owner: Nobody in particular
Requestors: perl [...] evancarroll.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: wishlist: /bin/yaml-check-valid
I'm having a bitch of a time keeping my yaml files valid, it would be nice if there was a program packaged with the distribution like `xmlstarlet` to xml, that gives me something I can call in a git-pre- commit hook, and dies if the yaml isn't valid. -- Evan Carroll System Lord of the Internets http://www.evancarroll.com
Subject: Re: [rt.cpan.org #53828] wishlist: /bin/yaml-check-valid
Date: Wed, 20 Jan 2010 20:39:18 +1100
To: bug-YAML [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
In the short term, there's probably a fairly reasonable one liner you can use. perl -MYAML -e "eval { YAML::LoadFile($ARGV[0]); }; exit($@ ? 1 : 0) }" file.yaml Or something similar. In the longer term, it's more complicated, because YAML isn't compliant with YAML the specification. Since the "authorative" parser is libyaml, which is what YAML::XS uses (I believe), crafting a script around that might be a better option. Adam K 2010/1/20 Evan Carroll via RT <bug-YAML@rt.cpan.org>: Show quoted text
> Tue Jan 19 15:38:20 2010: Request 53828 was acted upon. > Transaction: Ticket created by ECARROLL >       Queue: YAML >     Subject: wishlist: /bin/yaml-check-valid >   Broken in: (no value) >    Severity: Wishlist >       Owner: Nobody >  Requestors: perl@evancarroll.com >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=53828 > > > > I'm having a bitch of a time keeping my yaml files valid, it would be > nice if there was a program packaged with the distribution like > `xmlstarlet` to xml, that gives me something I can call in a git-pre- > commit hook, and dies if the yaml isn't valid. > -- > Evan Carroll > System Lord of the Internets > http://www.evancarroll.com >
This issue has been copied to: https://github.com/ingydotnet/yaml-pm/issues/103 please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.
Closing, see github