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

False warnings for ArraySegment<T> #257

Open
helviett opened this issue Jun 1, 2022 · 1 comment
Open

False warnings for ArraySegment<T> #257

helviett opened this issue Jun 1, 2022 · 1 comment

Comments

@helviett
Copy link

helviett commented Jun 1, 2022

ArraySegment<T> is a readonly struct, but analyzer thinks it is not and always gives ESP06 warning.

@vpenades
Copy link

vpenades commented Jun 3, 2022

I believe I am having a similar problem, with System.Numerics.Vectors

I have projects that target frameworks netstandard2 and net6 ... as it happens, in net6 several System.* libraries expose APIs with readonly modifier, but the netstandard 2.0 counterparts don't

In other words, it's impossible to optimize code for both frameworks; What's an optimization in net6 is seen as a performance issue in netstandard2.0

Personally, I think the solution would be to allow disabling analysis on specific frameworks

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

2 participants