[Repo Assist] test: add test case for FSAC0002 false positive in nullable join clause (issue #824)#1484
Draft
github-actions[bot] wants to merge 4 commits intomainfrom
Conversation
…oin (issue #824) The FCS SimplifyNames.getSimplifiableNames incorrectly marks row1 as a redundant qualifier when using the nullable join operator (=?) in a query expression. The identifier is actually required and removing it would break the code. This test documents the expected behavior (fix should NOT be offered). It uses itestCaseAsync because the bug is upstream in FCS and has no immediate fix in FSAC. When FCS is fixed, change itestCaseAsync to testCaseAsync. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
|
/repo-assist unignore the test, we want to check if it's passing |
Change itestCaseAsync to testCaseAsync to activate the regression test and check if the upstream FCS bug has been fixed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Commit pushed:
|
Contributor
Author
|
🤖 This is an automated response from Repo Assist. Done! I've changed
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is an automated PR from Repo Assist.
Summary
Adds a test case documenting the false positive FSAC0002 diagnostic that occurs when using the nullable join operator (
=?) in a query expression (issue #824).Problem
When writing a query expression like:
FSAC incorrectly reports
row1as a redundant qualifier (FSAC0002). The "Remove redundant qualifier" code fix appears, but applying it would break the code sincerow1is necessary in this context.Root Cause
This is an upstream bug in FCS:
FSharp.Compiler.EditorServices.SimplifyNames.getSimplifiableNamesincorrectly returnsrow1.Column1as simplifiable in a nullable join clause. FSAC simply reports what FCS tells it, so the fix needs to happen upstream.Change
Added a test case using
itestCaseAsync(ignored — does not run, does not fail CI) to theRemoveRedundantQualifiertest list. This approach is appropriate per the project convention:When the upstream FCS bug is fixed,
itestCaseAsyncshould be changed totestCaseAsyncto activate the regression test.Test Status
✅ Build:
dotnet build test/FsAutoComplete.Tests.Lsp/FsAutoComplete.Tests.Lsp.fsproj -f net8.0— succeeded (0 warnings, 0 errors)✅ Format:
dotnet fantomas— file was unchangedℹ️ The new test itself is ignored (
itestCaseAsync) so it does not run; it serves as documentation of the expected behavior.Closes #824