Pattern: Statement is line-wrapped
Issue: -
Checks that chosen statements are not line-wrapped. By default this check restricts wrapping import
and package
statements, but it's possible to check any statement.
<module name="NoLineWrap"/>
Example of incorrect code:
import com.puppycrawl.tools. //violation
checkstyle.api.AbstractCheck;
import static java.math. //violation
BigInteger.ZERO;
Example of correct code:
import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
import static java.math.BigInteger.ZERO;
To configure the check to force no line-wrapping only in import
statements:
<module name="NoLineWrap">
<property name="tokens" value="IMPORT"/>
</module>