Inspectopedia Help

Hardcoded line separator

Reports linefeed (\n) and carriage return (\r) character escape sequences used in string literals, character literals or text blocks. These characters are commonly used as line separators, and portability may suffer if they are hardcoded.


String count = "first\nsecond\rthird";

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023