ERROR: Failed to parse file [file:///httpdocs/media/media/js/mediamanager.js]
at line 78: Assigning to rvalue (with espree parser in module mode)
oncreatefolder: function()
{
if ($('#foldername').val().length) {
$('#dirpath').val() = this.getFolder(); <- *** ERROR NOT FLAGGED IN UI ***
Joomla.submitbutton('createfolder');
}
},
ERROR Assigning rvalue to rvalue
$(’#dirpath’).val() = this.getFolder();
FIX
$(’#dirpath’).val(this.getFolder());
Environment
INFO: SonarQube Scanner 4.0.0.1744
INFO: Java 11.0.1 Oracle Corporation (64-bit)
INFO: Mac OS X 10.14.6 x86_64
INFO: SonarQube server 7.6.0
INFO: Default locale: “en_GB”, source code encoding: “UTF-8” (analysis is platform dependent)
Expected behaviour
Error to be reported in SonarQube
Rule S2260 JavaScript parser failure IS on and reported correctly in another js file in the same scan
More Info
ERROR: Unable to parse file: Is passed through to SonarQube
ERROR: Failed to parse file: Missing from SonarQube
Given the name of rule S2260 seems to be the unexpected way round
TODO (I guess) amalgamate the 2 separate discovery paths into a consistent whole