Inspectopedia
 
2024.3

Unnecessary use of double quotes in string

Info
New
Last modified: 03 December 2024

Reports double-quoted strings that can be converted to single-quoted. Any string that doesn't contain any expression substitutions, or special symbols may be converted.

Example:

A quick-fix to convert a double-quoted string is available. After the quick-fix is applied, the result looks like this:

Use the Ignore strings containing single quotes checkbox to ignore strings that require escaping.

Inspired by 'RuboCop'