ariya / grunt-jsvalidate

Grunt task to validate JavaScript source
BSD 2-Clause "Simplified" License
103 stars 16 forks source link

Outputting JUnit XML ? #10

Open 0gust1 opened 10 years ago

0gust1 commented 10 years ago

I'm currently integrating front-end build tasks on a CI server. The CI manager would want a JUnitXML as output.

I've read a mention about that in http://ariya.ofilabs.com/2012/10/javascript-validator-with-esprima.html

I tried to pass a esprimaOptions: {format:'junit'} to the jsvalidate task, but it doesn't seem to work.

In https://github.com/ariya/grunt-jsvalidate/blob/master/tasks/jsvalidate.js the esprimaOptions doesn't seem to be used.

Maybe there is a good reason at that (impossibility to output well formed XML via Grunt ?), or maybe I missed something. What do you think about that ? I could try to implement this feature, if feasible / possible.

0gust1 commented 10 years ago

I played a little yesterday, I managed to generate a jUnit xml sekeleton on standard output.

But upon further research, I think it may be the same problematic as grunt-contrib-jshint : https://github.com/gruntjs/grunt-contrib-jshint/issues/8 For tight integration of tools like jsHint, jsValidate with an CI platform (Hudson / Jenkins), grunt tasks may not be the response.