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

SA1003 should validate null-coalescing assignment operator #3822

Closed
mnivet opened this issue Apr 5, 2024 · 1 comment · Fixed by #3823
Closed

SA1003 should validate null-coalescing assignment operator #3822

mnivet opened this issue Apr 5, 2024 · 1 comment · Fixed by #3823

Comments

@mnivet
Copy link

mnivet commented Apr 5, 2024

The rule SA1003 should validate spaces around the null-coalescing assignment operator (??=)

The following code raise no warnings with stylecop 1.2.0-beta.556:

value??=string.Empty;

While the expected style like with any other operator should be:

value ??= string.Empty;
@bjornhellander
Copy link
Contributor

I can fix this one

bjornhellander added a commit to bjornhellander/StyleCopAnalyzers that referenced this issue Apr 6, 2024
…unsigned right-shift operator, the unsigned right-shift assignment operator and the null-forgiving operator

DotNetAnalyzers#3822
@sharwell sharwell added this to the 1.2-beta.next milestone Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment