rspec/rules/S2046/php/rule.adoc

33 lines
556 B
Plaintext
Raw Normal View History

== Why is this an issue?
2021-04-28 16:49:39 +02:00
Shared coding conventions allow teams to collaborate effectively. This rule flags all Perl-style comments.
=== Noncompliant code example
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,php]
2021-04-28 16:49:39 +02:00
----
$myvar; # Noncompliant; this comment should have started with "//"
----
=== Compliant solution
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,php]
2021-04-28 16:49:39 +02:00
----
$myvar; // Compliant; this comment started with "//"
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Use "//" instead of "#" to start this comment
endif::env-github,rspecator-view[]