CodingStyle-NoWhitespacePointerReference

Whitespace rule in declarations before (or after) * or &

Required inputs: IR

There should never be a whitespace between the type and * or & in declarations. With option report_after_sigil also whitespace between * or & and identifier is reported. Whitespace between the type and a left parenthesis is not checked. The other options actually support to require some whitespace or exactly one space.

Possible Messages

Key

Text

Severity

Disabled

no_single_space_between

Use single space between {}.

None

False

no_whitespace_between

Add whitespace between {}.

None

False

space_in_sigil

Remove space in {}.

None

False

whitespace_between

Avoid whitespace between {}.

None

False

Options

report_after_sigil

report_after_sigil : bool = False

Report whitespace between * or & and identifier.
 

report_at_token

report_at_token : bool = False

Report position more accurately, i.e. at the type token. This option also reports spaces, i.e. for * *, more precise.
 

report_before_sigil

report_before_sigil : bool = True

Report whitespace between type and * or &.
 

require_single_space_after

require_single_space_after : bool = False

Require a single space after * or &. If true, supersedes require_space_after.
 

require_single_space_before

require_single_space_before : bool = False

Require a single space before * or &. If true, supersedes require_space_before.
 

require_space_after

require_space_after : bool = False

Report a missing space after * or &.
 

require_space_before

require_space_before : bool = False

Report a missing space before * or &.
 

treat_left_paren_as_type

treat_left_paren_as_type : bool = True

In int (*f) the left parenthesis is treated as the type token for the spacing. If false, whitespace between ( and * or & is not checked.