Miscellaneous-NoSingleCharIdentifier

Do not use identifiers consisting of just a single character

Required inputs: IR

Identifiers should be descriptive, therefore avoid single-character identifiers. Various options control exceptions of this rule.

Possible Messages

Key

Text

Severity

Disabled

single_char_identifier

Identifier is single-character identifier.

None

False

Options

exclude_catch

exclude_catch : bool = False

If true, identifiers to name the exception in catch handlers are tolerated.
 

exclude_local_nonstatic_variables

exclude_local_nonstatic_variables : bool = False

If true, local non-static variables are tolerated.
 

exclude_local_static_variables

exclude_local_static_variables : bool = False

If true, local static variables are tolerated.
 

exclude_loop_counter

exclude_loop_counter : bool = False

If true, for-loop counters are tolerated.
 

exclude_template_parameter_names

exclude_template_parameter_names : bool = False

If true, template parameter names are tolerated.
 

whitelist

whitelist : set[str] = set()

Allowed single-character names.