2023-05-03 11:06:20 +02:00
|
|
|
== Why is this an issue?
|
|
|
|
|
2021-01-27 13:42:22 +01:00
|
|
|
The multi-line comment syntax ``++/* ... */++`` should not be used for single line comments; the ``++--++`` syntax is more appropriate.
|
2020-06-30 12:48:07 +02:00
|
|
|
|
|
|
|
|
2023-05-03 11:06:20 +02:00
|
|
|
=== Noncompliant code example
|
2020-06-30 12:48:07 +02:00
|
|
|
|
2022-02-04 17:28:24 +01:00
|
|
|
[source,text]
|
2020-06-30 12:48:07 +02:00
|
|
|
----
|
|
|
|
/*
|
|
|
|
These comment lines are Compliant
|
|
|
|
comment 1
|
|
|
|
comment 2
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
This comment is also Compliant
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* This comment is Noncompliant */
|
|
|
|
----
|
|
|
|
|
|
|
|
|
2023-05-03 11:06:20 +02:00
|
|
|
=== Compliant solution
|
2020-06-30 12:48:07 +02:00
|
|
|
|
2022-02-04 17:28:24 +01:00
|
|
|
[source,text]
|
2020-06-30 12:48:07 +02:00
|
|
|
----
|
|
|
|
/*
|
|
|
|
These comment lines are Compliant
|
|
|
|
comment 1
|
|
|
|
comment 2
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
This comment is also Compliant
|
|
|
|
*/
|
|
|
|
|
|
|
|
-- This comment is compliant
|
|
|
|
----
|
|
|
|
|