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

Suppress IDE0044/IDE0051 for [InlineArray] types #69143

Open
stephentoub opened this issue Jul 21, 2023 · 0 comments · May be fixed by #76052
Open

Suppress IDE0044/IDE0051 for [InlineArray] types #69143

stephentoub opened this issue Jul 21, 2023 · 0 comments · May be fixed by #76052
Assignees
Milestone

Comments

@stephentoub
Copy link
Member

.NET 8 introduces the new InlineArrayAttribute, which is put onto a type to indicate that its sole field should be replicated the specified number of times. C# then provides automatic helpers for indexing into these types and getting at their data as spans. As a result, the field declared inside the type isn't actually referenced by the developer, and so various analyzers that warn about that end up firing false positives, e.g. IDE0044 "Add readonly modifier" and IDE0051 "Remove unused private members". Such analyzers should skip types marked as InlineArrayAttribute.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Jul 21, 2023
@stephentoub stephentoub changed the title Suppress IDE0044/IDE0051 for InlineArrayTypes Suppress IDE0044/IDE0051 for InlineArray types Jul 21, 2023
@stephentoub stephentoub changed the title Suppress IDE0044/IDE0051 for InlineArray types Suppress IDE0044/IDE0051 for [InlineArray] types Jul 21, 2023
@arunchndr arunchndr removed the untriaged Issues and PRs which have not yet been triaged by a lead label Aug 2, 2023
@arunchndr arunchndr added this to the 17.8 P4 milestone Aug 2, 2023
@arunchndr arunchndr modified the milestones: 17.8 P4, Backlog Nov 13, 2024
@CyrusNajmabadi CyrusNajmabadi modified the milestones: Backlog, 17.13 Nov 23, 2024
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.

4 participants