Inspectopedia Help

Unconventional constant name

Reports any constants whose names are either too short, too long, or do not follow the specified regular expression pattern.

Use the Pattern field to specify a regular expression for validating constant names.

Use the Min length and Max length fields to specify the minimum and maximum length of a name correspondingly.

Inspired by 'Ruby Style Guide'

Inspection options

Option

Type

Default

Pattern

String

[A-Z[\p{Lu}]][_A-Za-z0-9\x7f-\xff\x{001C0}-\x{10FFFF}]*

Min length

Number

3

Max length

Number

30

Inspection Details

Available in:

Qodana for Ruby 2023.3, RubyMine 2023.3

Plugin:

Ruby, 233.SNAPSHOT

Last modified: 13 July 2023