navigation

FavourConsistentThis (FL0074)

Introduced in 0.21.1

Cause

Different symbol was used for the instance identifier (e.g. using this, and also self).

Rationale

Using the same symbol for the instance identifier (e.g. this everywhere, or self everywhere) aids readability.

How To Fix

Replace all occurrences of the instance symbol used with the one configured in the rule settings (e.g. if using both self and this in the same codebase, decide which one to keep, and then only use one of them, not both).

Rule Settings

{
    "favourConsistentThis": {
        "enabled": false,
        "config": {
            "symbol": "this"
        }
    }
}