You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by GitBox <gi...@apache.org> on 2022/10/15 10:23:05 UTC

[GitHub] [lucenenet] NightOwl888 opened a new issue, #661: Review for IDE0044: Add readonly modifier to private fields

NightOwl888 opened a new issue, #661:
URL: https://github.com/apache/lucenenet/issues/661

   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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [lucenenet] nikcio commented on issue #661: Review for IDE0044: Add readonly modifier to private fields

Posted by GitBox <gi...@apache.org>.
nikcio commented on issue #661:
URL: https://github.com/apache/lucenenet/issues/661#issuecomment-1279738868

   Similar issues can be seen here: https://sonarcloud.io/project/issues?resolved=false&rules=csharpsquid%3AS2933&id=nikcio_lucenenet


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org