- ALM used: GitHub
- CI system used: not sure
- Scanner command used when applicable:
Statements should end with semicolons
- Languages of the repository: Mixed (but error will be in JS)
- Error observed:
Missing semicolon.
- Steps to reproduce:
I have enabled the rule to always add ;
at EOL in JS.
This works fine.
However, at this function it throws me a false alarm (or, I cannot see the missing semicolon, as for me, they are all there as it should be):
function read_url( input ) {
if ( input.files && input.files[0] ) {
var reader = new FileReader();
reader.onload = function ( e ) {
$( img_id ).attr( 'src', e.target.result );
}
reader.readAsDataURL( input.files[0] );
}
}
The error is thrown at line:
reader.readAsDataURL( input.files[0] );
That line has a semicolon!
AFAIK end of functions (thus, after }
no semicolon is needed?
So I am not sure what this is about (false alarm or me missing something)
Thanks for a second pair of eyes