Skip to content

Files

Latest commit

 

History

History
45 lines (28 loc) · 716 Bytes

Style-FormatStringToken.md

File metadata and controls

45 lines (28 loc) · 716 Bytes

Pattern: Inconsistent style for format string token

Issue: -

Description

Use a consistent style for named format string tokens.

Examples

EnforcedStyle: annotated

# bad

format('%{greeting}', greeting: 'Hello')
format('%s', 'Hello')

# good

format('%<greeting>s', greeting: 'Hello')
EnforcedStyle: template

# bad

format('%<greeting>s', greeting: 'Hello')
format('%s', 'Hello')

# good

format('%{greeting}', greeting: 'Hello')

Default configuration

Attribute Value
EnforcedStyle annotated
SupportedStyles annotated, template

Further Reading