Skip to content
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

InlineOneTimeUsageVariable #367

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

punkratz312
Copy link
Contributor

@punkratz312 punkratz312 commented Oct 14, 2024

The test is already in place, and the rest is history. Since the implementation is very similar to the template it was derived from, the main issue lies in scoping. The logic for resolving and handling unused (one-time) variables needs to be altered to extend the existing rule found in InlineVariable. This change is necessary to ensure that the rule identifies all unused variables, not just those that are used in return or throw statements.

@timtebeek timtebeek marked this pull request as draft October 14, 2024 16:49
@timtebeek timtebeek changed the title WIP: InlineOneTimeUsageVariable InlineOneTimeUsageVariable Oct 14, 2024
@timtebeek timtebeek self-requested a review October 14, 2024 16:49
@timtebeek
Copy link
Contributor

@punkratz312 this PR is still marked as draft; when would you say it's ready for review?

@timtebeek
Copy link
Contributor

Had another look; for now this seems a direct copy of InlineVariable; I assume there's plans to expand the coverage, and we can then decide if that best fits a separate recipe or not.

@timtebeek timtebeek removed their request for review December 4, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants