org.sonar.l10n.web.rules.Web.WhiteSpaceAroundCheck.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-web-plugin Show documentation
Show all versions of sonar-web-plugin Show documentation
Enables scanning of HTML, and JSP/JSF files.
The newest version!
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"; %>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy