You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there is no reporterOutputDir (set by reporterOutput), the reporter works as expected. However, when a reporterOutputDir exists, line 198 calls path.relative(reporterOutputDir, datum.file). This creates the path of reporterOutputDir relative to datum.file. However in Windows, this also has the side effect of changing the path to use \ as the delimeter, instead of /.
This may cause potential issues further along, as shown in this example. I believe that the path delimeters should stay consistent after this bit of code executes. I'm not sure what would be the "elegant solution" to this issue would be.
As a side note: Line 198 above does the Boolean check of reporterOutputDir for every single entry in results. This if statement should be moved outside of the foreach loop to save unnecessary re-evalutations.
The text was updated successfully, but these errors were encountered:
node -v : v0.10.35
grunt version : 0.4.5
grunt-contrib-jshint version : 0.11.2
Running
grunt jshint:bamboo
using the following GruntFile:I found that the
junit-output.xml
file was missing all the<failure>
messages. If I removed thereporterOutput
, this problem no longer occurred.I traced the issue back to grunt-contrib-jshint\tasks\lib\jshint.js, lines 197-199:
When there is no reporterOutputDir (set by
reporterOutput
), the reporter works as expected. However, when a reporterOutputDir exists, line 198 callspath.relative(reporterOutputDir, datum.file)
. This creates the path ofreporterOutputDir
relative todatum.file
. However in Windows, this also has the side effect of changing the path to use\
as the delimeter, instead of/
.This may cause potential issues further along, as shown in this example. I believe that the path delimeters should stay consistent after this bit of code executes. I'm not sure what would be the "elegant solution" to this issue would be.
As a side note: Line 198 above does the Boolean check of
reporterOutputDir
for every single entry inresults
. Thisif
statement should be moved outside of theforeach
loop to save unnecessary re-evalutations.The text was updated successfully, but these errors were encountered: