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

SA1011 false positive, C#8.0 and NullableContextOptions when used with arrays. #2927

Closed
jeroenlandheer opened this issue Apr 4, 2019 · 10 comments · Fixed by #2936
Closed
Assignees
Milestone

Comments

@jeroenlandheer
Copy link

An example:

byte[]? data = null; // SA1011 Closing Bracket should be followed by a space
byte[] ? data = null; // SA1018 Nullable type symbol should not be preceded by a space

I think SA1011 is a false positive.

@jeroenlandheer jeroenlandheer changed the title C#8.0 and NullableContextOptions gives SA1011 or SA1018 when used with arrays. SA1011 false positive, C#8.0 and NullableContextOptions when used with arrays. Apr 4, 2019
@sharwell sharwell added the c# 8 label Apr 4, 2019
@vweijsters vweijsters self-assigned this Apr 12, 2019
@vweijsters vweijsters added the bug label Apr 12, 2019
vweijsters added a commit to vweijsters/StyleCopAnalyzers that referenced this issue Apr 12, 2019
sharwell added a commit that referenced this issue Apr 17, 2019
Added support for CSharp8 tests and fixed #2927
@sharwell sharwell added this to the 1.2-beta.next milestone Apr 17, 2019
@sharwell sharwell added the fixed label Apr 17, 2019
@csMACnz
Copy link

csMACnz commented May 7, 2020

Any chance of a stable release with this in it so we can upgrade? :)

@sharwell
Copy link
Member

sharwell commented May 7, 2020

@csMACnz you can reference the StyleCop.Analyzers.Unstable package if you need a build without "beta" in the version number.

@csMACnz
Copy link

csMACnz commented May 7, 2020

Sneaky. But still a beta release, right?

@mikeblas
Copy link

This is an issue for me with StyleCop.Analyzers 1.1.118. But I think it was fixed more than 3 years ago. What am I doing wrong?

@sharwell
Copy link
Member

sharwell commented Mar 21, 2022

@mikeblas You need to be using 1.2.0-beta.66 or newer (listed under Milestone for this issue).

@mikeblas
Copy link

Thanks! Looks like this release has been in beta for some time -- 1.1.118 is more than 3 years old. Has development on StyleCop stopped? Is it deprecated?

@epitka
Copy link

epitka commented Jan 23, 2024

Still issue in 2024

@sharwell
Copy link
Member

sharwell commented Jan 23, 2024

@epitka This issue was fixed and shipped in 2019. There are currently no plans to change the release process.
#3213 (comment)

@epitka
Copy link

epitka commented Jan 24, 2024

It might have been, but I am still getting message with latest stable release

@sharwell
Copy link
Member

The latest stable release only supports C# 7. This issue relates to C# 8 and the specific package version you need is covered by #2927 (comment).

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.

6 participants