Skip to content

C#: Remove the query cs/useless-assignment-to-local from the code-quality suite. - #22193

Merged
michaelnebel merged 3 commits into
github:mainfrom
michaelnebel:csharp/diableuselessassignment
Jul 16, 2026
Merged

C#: Remove the query cs/useless-assignment-to-local from the code-quality suite.#22193
michaelnebel merged 3 commits into
github:mainfrom
michaelnebel:csharp/diableuselessassignment

Conversation

@michaelnebel

@michaelnebelmichaelnebel commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

In this PR we remove the query cs/useless-assignment-to-local from the code-quality suite.

@michaelnebel
michaelnebelforce-pushed the csharp/diableuselessassignment branch from 20c3ea4 to cb3f8a8CompareJuly 15, 2026 07:16
@michaelnebelmichaelnebel changed the title C#: Set the precision of cs/useless-assignment-to-local to medium.C#: Remove the query cs/useless-assignment-to-local from the code-quality suite.Jul 15, 2026
@michaelnebel
michaelnebel marked this pull request as ready for review July 15, 2026 07:53
@michaelnebel
michaelnebel requested a review from a team as a code ownerJuly 15, 2026 07:53
CopilotAI review requested due to automatic review settings July 15, 2026 07:53

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Removes cs/useless-assignment-to-local from C#’s standard code-quality suite while retaining it in the extended suite.

Changes:

  • Excludes the query from the standard suite.
  • Updates integration-test expectations and release notes.
Show a summary per file
FileDescription
csharp/ql/src/codeql-suites/csharp-code-quality.qlsExcludes the query by ID.
csharp/ql/src/change-notes/2026-07-15-code-quality-useless-assignment.mdDocuments the suite change.
csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expectedUpdates expected suite contents.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Medium

@michaelnebel
michaelnebel merged commit 2eb0158 into github:mainJul 16, 2026
21 checks passed
@hvitved

Copy link
Copy Markdown
Contributor

Too many FPs?

@jketema

Copy link
Copy Markdown
Contributor

Correct.

@michaelnebel
michaelnebel deleted the csharp/diableuselessassignment branch August 11, 2026 11:25
@michaelnebel

michaelnebel commented Aug 11, 2026

Copy link
Copy Markdown
ContributorAuthor

@hvitved : There were some concerns about including the query when Code Quality GA'ed due to false positives (there is an issue referencing this PR, where the topic is discussed). The false positive examples provided as the feedback are fixed here.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@michaelnebel@hvitved@jketema