rspec/rules/S1929/html/rule.adoc

24 lines
718 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
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 (``++<% ... %>++``).
2021-04-28 16:49:39 +02:00
== 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 -->
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
<!-- Do the thing -->
<%@ page import="java.io.*,java.util.*" %>
<% String title = "My Page"; %>
----