google-code-export / wro4j

Automatically exported from code.google.com/p/wro4j
1 stars 1 forks source link

Allow all errors to be found before the build fails. #701

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently (ignoring the <failThreshold> option), if <failOnError> is true, then 
the build will fail following the first resource with errors. With a larger 
build, it becomes tedious to start the build, find one file's error(s), fix 
them, build again, find the next file's error(s), etc.

It would be nice if the tool could perform like jslint4java, and find all 
errors present across all files (and in this case, groups), and fail the build 
afterward.

Original issue reported on code.google.com by Cineris1...@gmail.com on 8 Apr 2013 at 3:00

GoogleCodeExporter commented 9 years ago
NOTE: This is in regard to the JSHint plugin.

Original comment by Cineris1...@gmail.com on 8 Apr 2013 at 3:02

GoogleCodeExporter commented 9 years ago
After jshint goal of the wro4j maven plugin is executed, a report is generated 
in /target/wro4j-reports containing detailed description of all found errors. 

Original comment by alex.obj...@gmail.com on 8 Apr 2013 at 3:08

GoogleCodeExporter commented 9 years ago
Yes, but that is not the issue I am addressing. The only ways to have the 
JSHint plugin scan the entire project is to set <failNever> to true, to set 
<failThreshold> higher than the number of errors in the project, or to set 
<failOnError> to false. All of these options mean that the build itself is a 
success.

The issue I'm addressing is to allow JSHint to find all errors in all files, 
and then fail the build.

Original comment by Cineris1...@gmail.com on 8 Apr 2013 at 3:14

GoogleCodeExporter commented 9 years ago
Doesn't the report contains all existing errors even when the failOnError is 
set to true?

Original comment by alex.obj...@gmail.com on 8 Apr 2013 at 3:16

GoogleCodeExporter commented 9 years ago
No, it only contains the error(s) reported to the console, i.e. the error(s) 
found in the first file in which errors were encountered.

Original comment by Cineris1...@gmail.com on 8 Apr 2013 at 3:21

GoogleCodeExporter commented 9 years ago
In that case, would it be acceptable for you to add new flag: failFast (true by 
default) which would allow full report creation when false value is set?

Original comment by alex.obj...@gmail.com on 8 Apr 2013 at 3:32

GoogleCodeExporter commented 9 years ago
I think that would be ideal.

I've looked into doing this in a fork of my own, but unfortunately, I don't 
know the wro4j system all that well.

Original comment by Cineris1...@gmail.com on 8 Apr 2013 at 3:40

GoogleCodeExporter commented 9 years ago
You don't have to understand everything in order to fix this one issue. 
A contribution is very appreciated, given limited amount of available time.

Original comment by alex.obj...@gmail.com on 8 Apr 2013 at 3:45

GoogleCodeExporter commented 9 years ago
Fixed in branch 1.6.x

Original comment by alex.obj...@gmail.com on 24 Apr 2013 at 2:14

GoogleCodeExporter commented 9 years ago
This works beautifully. Thank you!

Original comment by Cineris1...@gmail.com on 24 Apr 2013 at 5:44

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 8 Jun 2013 at 9:43