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
QL: Add query detecting suspiciously missing parameters from the QLDoc of a predicate #7450
base: main
Are you sure you want to change the base?
Conversation
13055ef
to
cb0a1c3
02958e6
to
55cdef4
Could this be tuned to handle the case where all parameters have been renamed? That case can not be caught currently due to the first of your requirements. (I'm particularly interested in the /1 case) |
I thought it would be bad, but it worked great I also found a few more tweaks to reduce the FP rate. Edit: And I did some drive-by patching of explicit-this and redundant-cast, to further reduce the number of results in |
Overall this looks okay to me, but it's still fairly noisy. One common source of noise is when the QLDoc mentions language-specific syntax (like null
, break
, or return
).
I don't know if there's a way to annotate inline code snippets with the desired highlighting language. Some MarkDown flavours support this, but it's not clear to me that the one in VSCode does.
Either way, I think we need to cut down on the number of false positives before merging this.
I added a QL-for-QL query that flags suspicious QLDoc for a predicate when:
This turns out to be good at identifying lots of QLDocs where the parameters mentioned in the qldoc do not match up with the actual parameter names.
I fixed most of the issues identified in the
javascript/
folder. The remaining issues injavascript/
seem benign.There are still lots of issues for the other languages. I have not tried to fix those.
The text was updated successfully, but these errors were encountered: