rspec/rules/S2479/java/rule.adoc
2022-02-04 16:28:24 +00:00

35 lines
730 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

include::../description.adoc[]
== Noncompliant Code Example
[source,java]
----
String tabInside = "A B"; // Noncompliant, contains a tabulation
String zeroWidthSpaceInside = "foobar"; // Noncompliant, it contains a U+200B character inside
char tab = ' ';
----
== Compliant Solution
[source,java]
----
String tabInside = "A\tB"; // Compliant, uses escaped value
String zeroWidthSpaceInside = "foo\u200Bbar"; // Compliant, uses escaped value
char tab = '\t';
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]