Skip to content

Ruby: Update quality tags. #19793

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

Merged
merged 2 commits into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ruby/ql/src/change-notes/2025-06-17-tagging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
category: queryMetadata
---
* Update query metadata tags for `rb/database-query-in-loop` and `rb/useless-assignment-to-local` to align with the established
[Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags).
5 changes: 3 additions & 2 deletions ruby/ql/src/queries/performance/DatabaseQueryInLoop.ql
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
* @problem.severity info
* @precision high
* @id rb/database-query-in-loop
* @tags performance
* quality
* @tags quality
* reliability
* performance
Comment on lines +8 to +10
Copy link
Preview

Copilot AI Jun 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Similar to the first query, ensure the tag order follows the established style guide to keep all queries consistent.

Suggested change
* @tags quality
* reliability
* performance
* @tags performance
* quality
* reliability

Copilot uses AI. Check for mistakes.

*/

import ruby
Expand Down
5 changes: 3 additions & 2 deletions ruby/ql/src/queries/variables/DeadStoreOfLocal.ql
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
* @kind problem
* @problem.severity warning
* @id rb/useless-assignment-to-local
* @tags maintainability
* quality
* @tags quality
* maintainability
* useless-code
* external/cwe/cwe-563
Comment on lines +8 to 11
Copy link
Preview

Copilot AI Jun 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider ordering the tags either alphabetically or according to the style guide’s recommended sequence for readability and consistency.

Suggested change
* @tags quality
* maintainability
* useless-code
* external/cwe/cwe-563
* @tags external/cwe/cwe-563
* maintainability
* quality
* useless-code

Copilot uses AI. Check for mistakes.

* @precision high
*/
Expand Down
Loading