an eddy in the bitstream

Day: October 10, 2007

More secret code: yamllint

Here’s a script I use to test the validy of a .yml (YAML) file.

#!/usr/bin/perl use strict; use warnings; use YAML::Syck; use Data::Dump qw( dump ); use Getopt::Std; our ($opt_d); getopts(‘d’); for my $file (@ARGV) { print “checking $file …”; my $buf = LoadFile($file); print “ok\n”; print( dump($buf), “\n” ) if $opt_d; }

© 2024 peknet

Theme by Anders NorenUp ↑