codeql icon indicating copy to clipboard operation
codeql copied to clipboard

Remove unnecessary query

Open knewbury01 opened this issue 1 year ago • 3 comments

Pull Request checklist

~does a query removal require a changenote?~ added

I propose removing this query, as it is subsumed by the logic of EmptyBlock which does also cover statements

ran these both using MRVA on top 10 java repos

and did a check explicitly on all results from junit-team/junit4 database that the result set of EmptyBlock completely subsumed the results of the removed query

suspect it will be similar for other databases (though encourage anyone else to double check my logic on this as well)

All query authors

Internal query authors only

  • [ ] Autofixes generated based on these changes are valid, only needed if this PR makes significant changes to .ql, .qll, or .qhelp files. See the documentation (internal access required).
  • [ ] Changes are validated at scale (internal access required).
  • [ ] Adding a new query? Consider also adding the query to autofix.

knewbury01 avatar Oct 03 '24 17:10 knewbury01

QHelp previews:

github-actions[bot] avatar Oct 03 '24 17:10 github-actions[bot]

Yes, it does need a change note, in case people wonder why they've lost some results.

owen-mc avatar Oct 03 '24 20:10 owen-mc

Yes, it does need a change note, in case people wonder why they've lost some results.

thanks! I wasnt totally sure what changenote category to use here

I see in the doc that normally a query deletion is breaking, but this query doesnt seem to be in a pack (searching via the action artifact code scanning query list) , so I used minorAnalysis... let me know if that was not correct! thanks!

knewbury01 avatar Oct 03 '24 21:10 knewbury01