Skip to content

📎 Enhance noConstantCondition with type information #5704

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

Open
arendjr opened this issue Apr 18, 2025 · 0 comments · May be fixed by #5715
Open

📎 Enhance noConstantCondition with type information #5704

arendjr opened this issue Apr 18, 2025 · 0 comments · May be fixed by #5715
Assignees
Labels
A-Core Area: core A-Linter Area: linter

Comments

@arendjr
Copy link
Contributor

arendjr commented Apr 18, 2025

Description

noConstantCondition currently checks a limited set of expressions to determine whether they evaluate to a constant truthiness or falsiness. We can improve this by changing the rule to make use of the Typed service so that it can pull in type information from identifiers too.

I just noticed the rule has quite an extensive set of tests already, so getting our type infrastructure to handle all of those correctly is probably quite a bit of work already. Feel free to divide the work into chunks if possible, or ask for help if there are any questions!

@arendjr arendjr added A-Core Area: core A-Linter Area: linter labels Apr 18, 2025
@arendjr arendjr changed the title 📎 Enhance with noConstantCondition with type information 📎 Enhance noConstantCondition with type information Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Core Area: core A-Linter Area: linter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants