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

Flag listOfNotNull if all arguments are non-nullable #2916

Closed
veyndan opened this issue Jul 31, 2020 · 0 comments · Fixed by #2932
Closed

Flag listOfNotNull if all arguments are non-nullable #2916

veyndan opened this issue Jul 31, 2020 · 0 comments · Fixed by #2932

Comments

@veyndan
Copy link
Contributor

veyndan commented Jul 31, 2020

Based on the discussion from #2864 (comment).

We could extend the rule UselessCallOnNotNull to also flag invocations of listOfNotNull when all the functions arguments are non-nullable.

Noncompliant Code

listOfNotNull("string")

Compliant Code

listOf("string")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants