andoaki / jslint4java

Automatically exported from code.google.com/p/jslint4java
Other
0 stars 0 forks source link

Running jslint ant task on emty fileset throws exception #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run ant task on project without js files

What is the expected output? What do you see instead?
I would like to have one of: 'no report', 'print warning', 'allow me to 
configure if it should fail'.

What version of the product are you using? On what operating system?
1.4.6

Please provide any additional information below.

Original issue reported on code.google.com by erwin.kr...@gmail.com on 25 Feb 2011 at 1:41

GoogleCodeExporter commented 8 years ago
Just curious—what's the use case here?  Why would you want to run jslint with 
no js files?

I'm amenable to adding a flag to turn this into a warning.

Original comment by d...@happygiraffe.net on 25 Feb 2011 at 5:14

GoogleCodeExporter commented 8 years ago
The use case is for Maven: put the configuration in a parent pom.xml behind a 
profile and run it for the complete project. There are sub-projects without js 
files.

Original comment by erwin.kr...@gmail.com on 25 Feb 2011 at 9:45

GoogleCodeExporter commented 8 years ago
Thanks—that makes sense.

Original comment by d...@happygiraffe.net on 27 Feb 2011 at 9:20

GoogleCodeExporter commented 8 years ago
Fixed in 6a5af786.

https://github.com/happygiraffe/jslint4java/commit/6a5af78678237270e3ac8f7b62055
3a7f1597d12

This makes the haltOnFailure property also control the fail-on-no-files 
behavior.  We now warn instead of throwing a BuildException.

However, I suspect that this isn't enough for you, as it won't fail the build 
on invalid JS any more.  Let me have another think about this.

Original comment by d...@happygiraffe.net on 27 Feb 2011 at 9:26

GoogleCodeExporter commented 8 years ago
OK, really fixed in cab09b39.

https://github.com/happygiraffe/jslint4java/commit/cab09b397fcd71d1a89ad94a6e971
dc31334e5b8

Now, we never complain about lack of lack of input.

Original comment by d...@happygiraffe.net on 27 Feb 2011 at 9:41