well, ideally we should validate all the puppet modules too (*.pp files) for syntax errors, at the time of packaging the modules.
On Sun, Jan 17, 2016 at 2:24 AM, Sajith Kariyawasam <[email protected]> wrote: > Hi Devs, > > While implementing puppet modules in [1] I came across with syntax errors > (using tabs, missing semicolons etc) in yaml files and which was detected > only at the puppet runtime. > True that some editors do syntax validation, but there could be situations > developers use simple editors. IMO its good if we can provide yaml > validation into the project itself, which would > make sure there are no yaml syntax errors. For now, I wrote a simple ruby > script[2] to validate this and were able to find one issue in a yaml file > :) > May be we could incorporate this into the maven build file? WDYT? > > [1] https://github.com/wso2/puppet-modules > [2] > ================================= > begin > require 'yaml' > > Dir.glob('**/*.yaml') do |rb_file| > YAML.load_file("#{rb_file}") > end > > rescue => e > puts "Error during processing: #{$!}" > end > ================================= > > Thanks, > Sajith > > -- > Sajith Kariyawasam > *Committer and PMC member, Apache Stratos, * > *WSO2 Inc.; http://wso2.com <http://wso2.com>* > *Mobile: 0772269575* > -- Sajith Kariyawasam *Committer and PMC member, Apache Stratos, * *WSO2 Inc.; http://wso2.com <http://wso2.com>* *Mobile: 0772269575*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
