File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,19 +13,31 @@ grunt.initConfig({
1313} ) ;
1414
1515grunt . registerTask ( "xmllint" , function ( ) {
16- var taskDone = this . async ( ) ;
17- grunt . utils . async . forEachSeries ( entryFiles , function ( file , done ) {
16+ var task = this ,
17+ taskDone = task . async ( ) ;
18+ grunt . utils . async . forEachSeries ( entryFiles , function ( fileName , fileDone ) {
19+ grunt . verbose . write ( "Linting " + fileName + "..." ) ;
1820 grunt . utils . spawn ( {
1921 cmd : "xmllint" ,
20- args : [ "--noout" , file ]
22+ args : [ "--noout" , fileName ]
2123 } , function ( err , result ) {
2224 if ( err ) {
25+ grunt . verbose . error ( ) ;
2326 grunt . log . error ( err ) ;
24- done ( ) ;
27+ fileDone ( ) ;
2528 return ;
2629 }
27- done ( ) ;
28- } , taskDone ) ;
30+ grunt . verbose . ok ( ) ;
31+ fileDone ( ) ;
32+ } ) ;
33+ } , function ( ) {
34+ if ( task . errorCount ) {
35+ grunt . warn ( "Task \"xmllint\" failed." ) ;
36+ taskDone ( ) ;
37+ return ;
38+ }
39+ grunt . log . writeln ( "Lint free." ) ;
40+ taskDone ( ) ;
2941 } ) ;
3042} ) ;
3143
You can’t perform that action at this time.
0 commit comments