Skip to content

[Repo Assist] test: add regression test for false-positive RemoveRedundantQualifier (issue #1259)#1482

Draft
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/test-issue-1259-redundant-qualifier-false-positive-5f4ed600e4ce1387
Draft

[Repo Assist] test: add regression test for false-positive RemoveRedundantQualifier (issue #1259)#1482
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/test-issue-1259-redundant-qualifier-false-positive-5f4ed600e4ce1387

Conversation

@github-actions
Copy link
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Closes #1259

Summary

Adds a regression test for the false-positive "This qualifier is redundant" code fix reported in #1259, where a local variable user shadows an Envelop.user property, causing envelop.user.Name to incorrectly receive the redundant-qualifier suggestion.

Root Cause

As noted in the issue comments, this is likely a false positive originating upstream in FCS's SimplifyNameAnalyzer. The test is designed to track whether the issue is still present in the current version of FCS.

What the test does

The new test case "doesn't offer fix when qualifier is not redundant due to variable shadowing property (issue #1259)" is added to removeRedundantQualifierTests and uses CodeFix.checkNotApplicable to assert that the RemoveRedundantQualifier code fix should not be offered on envelop.user.Name when a local user variable exists in scope.

If the bug is still present: this test will fail, making the regression visible in CI.
If FCS has been fixed: this test will pass, confirming the issue is resolved.

Test Status

Build: succeeded
Tests: not run in full (test suite takes significant time); the test file compiles cleanly. The test may fail if the upstream FCS false-positive is still present — that outcome is expected and intentional to make the regression visible.

Generated by Repo Assist for issue #1259

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@afb00b92a9514fee9a14c583f059a03d05738f70

…variable shadows property (issue #1259)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to 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.

Invalid This qualifier is redundant when a variable is shadowed by a property with the same name and compatible signature

0 participants