-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some static analyzer warnings (issue 11965) #12561
Fix some static analyzer warnings (issue 11965) #12561
Conversation
This fixes only those warnings, as reported by https://lgtm.com/projects/g/mozilla/pdf.js?mode=list, that make sense (as far as I'm concerned). Hence this patch leaves the following things unaddressed: - The "recommendation"-category, since it only complains about unused variables. However, note that all of those cases are purposely included and that there's thus ESLint-disable comments added to explictly allow them. - The "warning"-category, which still contains two complaints. However, as far as I can tell, they are both false positives. Given first of all the false positives of the LGTM static analyzer, and secondly that we'd need to add (essentially duplicated) disable-comments for the unused variable cases, it's not entirely clear to me if we actually want to work towards including LGTM in the PDF.js project (e.g. running alongside Travis) or if we should just close issue 11965.
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/89dae7c4bbc7aa5/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/89dae7c4bbc7aa5/output.txt Total script time: 4.00 mins Published |
Thank you! I'd say this is enough to close the issue. If we ever want to do more with this, we can always do so. |
I don't think the useless comparison test in
If |
That's certainly an interesting find; thank you! However, since that we're currently not intending on integrating LGTM officially for this repo, we can probably just leave this as-is for now. Given that there's similar code in the |
This fixes only those warnings, as reported by https://lgtm.com/projects/g/mozilla/pdf.js?mode=list, that make sense (as far as I'm concerned).
Hence this patch leaves the following things unaddressed:
Given first of all the false positives of the LGTM static analyzer, and secondly that we'd need to add (essentially duplicated) disable-comments for the unused variable cases, it's not entirely clear to me if we actually want to work towards including LGTM in the PDF.js project (e.g. running alongside Travis) or if we should just close issue #11965.