org.sonar.l10n.web.rules.Web.WhiteSpaceAroundCheck.html Maven / Gradle / Ivy
The newest version!
The proper use of white space makes a major contribution to code readability.
This rule check that there is 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"; %>