All private fields in classes that are not mutated by the class can be declared readonly. This diverges from Java Lucene, so we should add a comment // LUCENENET: marked readonly.
All private fields in structs should not be declared readonly, as this negatively affects performance. Instead, we should use an attribute on all structs to suppress this warning.
Any existing suppressions of IDE0044 in classes may be removed.
https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0044 https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=nikcio_lucenenet&open=AYPAuPfOhbfJOGLOobGt
All private fields in classes that are not mutated by the class can be declared
readonly
. This diverges from Java Lucene, so we should add a comment// LUCENENET: marked readonly
.All private fields in structs should not be declared
readonly
, as this negatively affects performance. Instead, we should use an attribute on all structs to suppress this warning.Any existing suppressions of IDE0044 in classes may be removed.