Skip to content

Commit be230c1

Browse files
authored
Move DocCommentLineLength Sniff to Docs ruleset (#188)
2 parents 452e70e + 7d33714 commit be230c1

13 files changed

+47
-22
lines changed

BigBite/ruleset.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BigBite" namespace="BigBiteCS\BigBite" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
2+
<ruleset name="BigBite" namespace="BigBiteCS\BigBite" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
33
<config name="encoding" value="utf-8" />
44
<config name="testVersion" value="8.2-" />
55

@@ -71,7 +71,7 @@
7171
<rule ref="WordPress-VIP-Go" />
7272

7373
<!-- Use Big Bite's code documentation ruleset. -->
74-
<rule ref="BigBite-Docs" />
74+
<rule ref="BigBiteDocs" />
7575

7676
<!-- ################ -->
7777
<!-- Additional rules -->
File renamed without changes.

BigBite/Sniffs/Commenting/DocCommentLineLengthSniff.php renamed to BigBiteDocs/Sniffs/Commenting/DocCommentLineLengthSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
/**
33
* BigBite Coding Standards.
44
*
5-
* @package BigBiteCS\BigBite
5+
* @package BigBiteCS\BigBiteDocs
66
* @link https://github.com/bigbite/phpcs-config
77
* @license https://opensource.org/licenses/MIT MIT
88
*/
99

10-
namespace BigBiteCS\BigBite\Sniffs\Commenting;
10+
namespace BigBiteCS\BigBiteDocs\Sniffs\Commenting;
1111

1212
use PHP_CodeSniffer\Files\File;
1313
use PHP_CodeSniffer\Sniffs\Sniff;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
/**
3+
* Unit test class for BigBite Coding Standard.
4+
*
5+
* @package BigBiteCS\BigBiteDocs
6+
* @link https://github.com/bigbite/phpcs-config
7+
* @license https://opensource.org/licenses/MIT MIT
8+
*/
9+
10+
namespace BigBiteCS\BigBiteDocs\Tests;
11+
12+
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest as PhpCsAbstractSniffUnitTest;
13+
14+
/**
15+
* Unit test class for BigBite Coding Standard.
16+
*/
17+
abstract class AbstractSniffUnitTest extends PhpCsAbstractSniffUnitTest {
18+
}
File renamed without changes.
File renamed without changes.

BigBite/Tests/Commenting/DocCommentLineLengthUnitTest.2.inc renamed to BigBiteDocs/Tests/Commenting/DocCommentLineLengthUnitTest.2.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

3-
// phpcs:set BigBite.Commenting.DocCommentLineLength lineLimit 120
4-
// phpcs:set BigBite.Commenting.DocCommentLineLength absoluteLineLimit 150
3+
// phpcs:set BigBiteDocs.Commenting.DocCommentLineLength lineLimit 120
4+
// phpcs:set BigBiteDocs.Commenting.DocCommentLineLength absoluteLineLimit 150
55

66
/**
77
* This is a comment line that exceeds the default of 80 characters, but is shorter than the configured 120 characters.
@@ -15,5 +15,5 @@
1515
* This is a comment line that exceeds the default maximum of 100 characters, and is longer than the configured maximum of 150 characters, so should trigger an error.
1616
*/
1717

18-
// phpcs:set BigBite.Commenting.DocCommentLineLength lineLimit 80
19-
// phpcs:set BigBite.Commenting.DocCommentLineLength absoluteLineLimit 100
18+
// phpcs:set BigBiteDocs.Commenting.DocCommentLineLength lineLimit 80
19+
// phpcs:set BigBiteDocs.Commenting.DocCommentLineLength absoluteLineLimit 100
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

3-
// phpcs:set BigBite.Commenting.DocCommentLineLength absoluteLineLimit 90
4-
// phpcs:set BigBite.Commenting.DocCommentLineLength includeIndentation true
3+
// phpcs:set BigBiteDocs.Commenting.DocCommentLineLength absoluteLineLimit 90
4+
// phpcs:set BigBiteDocs.Commenting.DocCommentLineLength includeIndentation true
55

66
/**
77
* This is a comment line that should trigger a warning.
@@ -11,5 +11,5 @@
1111
* This is a comment line that should trigger an error due to this config setting.
1212
*/
1313

14-
// phpcs:set BigBite.Commenting.DocCommentLineLength absoluteLineLimit 90
15-
// phpcs:set BigBite.Commenting.DocCommentLineLength includeIndentation false
14+
// phpcs:set BigBiteDocs.Commenting.DocCommentLineLength absoluteLineLimit 90
15+
// phpcs:set BigBiteDocs.Commenting.DocCommentLineLength includeIndentation false

BigBite/Tests/Commenting/DocCommentLineLengthUnitTest.php renamed to BigBiteDocs/Tests/Commenting/DocCommentLineLengthUnitTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
/**
33
* Unit test class for BigBite Coding Standard.
44
*
5-
* @package BigBiteCS\BigBite
5+
* @package BigBiteCS\BigBiteDocs
66
* @link https://github.com/bigbite/phpcs-config
77
* @license https://opensource.org/licenses/MIT MIT
88
*/
99

10-
namespace BigBiteCS\BigBite\Tests\Commenting;
10+
namespace BigBiteCS\BigBiteDocs\Tests\Commenting;
1111

12-
use BigBiteCS\BigBite\Tests\AbstractSniffUnitTest;
12+
use BigBiteCS\BigBiteDocs\Tests\AbstractSniffUnitTest;
1313

1414
/**
1515
* Unit test class for the DocCommentLineLength sniff.
1616
*
17-
* @package BigBiteCS\BigBite
17+
* @package BigBiteCS\BigBiteDocs
1818
*/
1919
final class DocCommentLineLengthUnitTest extends AbstractSniffUnitTest {
2020

BigBite-Docs/ruleset.xml renamed to BigBiteDocs/ruleset.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<ruleset name="BigBite-Docs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
2+
<ruleset name="BigBiteDocs" namespace="BigBiteCS\BigBiteDocs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpcodesniffer.com/phpcs.xsd">
33
<!-- Check block comments for conformity.. -->
44
<rule ref="Generic.Commenting.DocComment">
55
<!-- Allow other tags to come before @param comments - @see, @link, etc. -->

0 commit comments

Comments
 (0)