The proper use of white space makes a major contribution to code readability.
This rule raises an issue when there is not a space character after the beginning and before the end of each comment (<!-- ...
-->
), directive (<%@ ... %>
), and expression (<% ... %>
).
Noncompliant code example
<!--Do the thing--> <!-- Noncompliant; missing space at beginning and end of text-->
<%@page import="java.io.*,java.util.*" %> <!-- Noncompliant; missing space at beginning -->
<% String title = "My Page";%> <!-- Noncompliant; missing space at end -->
Compliant solution
<!-- Do the thing -->
<%@ page import="java.io.*,java.util.*" %>
<% String title = "My Page"; %>