Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Commit 0db1bcf

Browse files
Inline doc comments must be valid (#47)
1 parent fabf3f0 commit 0db1bcf

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

src/Libero/ruleset.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
</property>
8383
</properties>
8484
</rule>
85+
<rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration"/>
8586
<rule ref="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment"/>
8687
<rule ref="SlevomatCodingStandard.Commenting.UselessInheritDocComment"/>
8788
<rule ref="SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses"/>
@@ -128,9 +129,12 @@
128129
</properties>
129130
</rule>
130131
<rule ref="Squiz.Classes.ClassFileName"/>
131-
<rule ref="Squiz.Commenting.BlockComment"/>
132+
<rule ref="Squiz.Commenting.BlockComment">
133+
<exclude name="Squiz.Commenting.BlockComment.WrongStart"/>
134+
</rule>
132135
<rule ref="Squiz.Commenting.DocCommentAlignment"/>
133136
<rule ref="Squiz.Commenting.InlineComment">
137+
<exclude name="Squiz.Commenting.InlineComment.DocBlock"/>
134138
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
135139
<exclude name="Squiz.Commenting.InlineComment.NotCapital"/>
136140
<exclude name="Squiz.Commenting.InlineComment.SpacingAfter"/>

tests/cases/php/comments-inline

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---DESCRIPTION---
2+
Inline doc comments must be valid
3+
---CONTENTS---
4+
<?php
5+
6+
declare(strict_types=1);
7+
8+
/** @var $foo string */
9+
$foo = 'bar';
10+
11+
/** @var string */
12+
$baz = 'qux';
13+
14+
---FIXED---
15+
<?php
16+
17+
declare(strict_types=1);
18+
19+
/** @var string $foo */
20+
$foo = 'bar';
21+
22+
/** @var string */
23+
$baz = 'qux';
24+
25+
---MESSAGES---
26+
8:1 SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.InvalidFormat
27+
---

0 commit comments

Comments
 (0)