Review for CA1822: Mark members as static #663
Labels
good-first-issue
Good for newcomers
hacktoberfest-accepted
is:enhancement
New feature or request
performance
https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=nikcio_lucenenet&open=AYPAuPfOhbfJOGLOobHM
https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822
Members that do not access instance data or call instance methods can be marked static. This may diverge from the Java implementation, so we should mark these members with the comment
// LUCENENET: CA1822: Mark members as static
.A check should be made against the Lucene source code first before applying this change. If there is no
final
modifier on a method in Java......it means it should be declared
virtual
in .NET (unless the class is sealed).In this case, we cannot declare the method/property
static
and instead add the missingvirtual
modifier.The text was updated successfully, but these errors were encountered: