Skip to content

Gendarme.Rules.Maintainability.ReviewMisleadingFieldNamesRule(git)

Sebastien Pouliot edited this page Mar 2, 2011 · 1 revision

ReviewMisleadingFieldNamesRule

Assembly: Gendarme.Rules.Maintainability
Version: git

Description

This rule checks for fields which have misleading names, e.g. instance fields beginning with "s_" or static fields beginning with "m_", since they can be confusing when reading source code.

Examples

Bad example:

public class Bad {
    int s_value;
    static int m_other_value;
}

Good example:

public class Good {
    int value;
    static int other_value;
}

Source code

You can browse the latest source code of this rule on github.com

Clone this wiki locally