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

Add optional check for whether a variable can be readonly #3115

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Flu
Copy link

@Flu Flu commented Jan 7, 2025

Adds an optional check for triggering a SC2331 for variables that are declared (and/or initialized) but never assigned to again. If a variable is found that matches, a note is given to maybe declare it as readonly.

Also implemented tests for it, as well as for the option itself in Checker.hs

In accordance to #2987, but it's not the full issue.

Let me know if you want to implement the full issue suggestion, as part of the same optional check, another optional check, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant