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

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Java, 241.16690

Last modified: 29 April 2024