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

(CS-R1135) null literal explicitly passed to ?? operator #19

Open
dgmjr opened this issue Aug 4, 2024 · 0 comments
Open

(CS-R1135) null literal explicitly passed to ?? operator #19

dgmjr opened this issue Aug 4, 2024 · 0 comments

Comments

@dgmjr
Copy link
Contributor

dgmjr commented Aug 4, 2024

Description

The null-coalescing operator ?? returns the value of its left-hand operand if it isn't null; otherwise, it evaluates the right-hand operand and returns its result. Passing in null explicitly is the same as not using the said operator at all. Instead, consider dropping the operator altogether and using the assignment …

Occurrences

There is 1 occurrence of this issue in the repository.

See all occurrences on DeepSource → app.deepsource.com/gh/dgmjr-io/Dgmjr.Identity/issue/CS-R1135/occurrences/

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

No branches or pull requests

1 participant