-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Slim] Add PHP CodeSniffer config template (#1764)
* [Slim] Add PHP_CodeSniffer config template * [Slim] Update doc * [Slim] Add local configs to gitignore PHPUnit and PHP_CodeSniffer provides the same developing pattern when user overrides global config with local one. In local config he can set environment variables. Official doc recommends to not commit local config files. * [Slim] Remove phpcsStandard CLI option Now user have full freedom to override config file. This option is not used and not necessary anymore. * [Slim] Refresh samples
- Loading branch information
Showing
16 changed files
with
253 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
modules/openapi-generator/src/main/resources/php-slim-server/phpcs.xml.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0"?> | ||
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="{{appName}} Config" xsi:noNamespaceSchemaLocation="phpcs.xsd"> | ||
<description>PHP_CodeSniffer config for {{appName}}</description> | ||
|
||
<!-- Path to inspected files --> | ||
<file>./</file> | ||
|
||
<!-- Don't need to inspect installed packages --> | ||
<exclude-pattern>./vendor</exclude-pattern> | ||
|
||
<!-- <basepath> A path to strip from the front of file paths inside reports --> | ||
<arg name="basepath" value="."/> | ||
|
||
<!-- colors Use colors in output --> | ||
<arg name="colors"/> | ||
|
||
<!-- Do not print warnings --> | ||
<!-- <arg name="warning-severity" value="0"/> --> | ||
|
||
<!-- -p Show progress of the run --> | ||
<!-- -s Show sniff codes in all reports --> | ||
<arg value="ps"/> | ||
|
||
<!-- Include the whole PSR12 standard --> | ||
<rule ref="PSR12"> | ||
<!-- There is no way to wrap generated comments, just disable that rule for now --> | ||
<exclude name="Generic.Files.LineLength.TooLong" /> | ||
<!-- Codegen generates variables with underscore on purpose --> | ||
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore" /> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
samples/server/petstore-security-test/php-slim/phpcs.xml.dist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0"?> | ||
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r Config" xsi:noNamespaceSchemaLocation="phpcs.xsd"> | ||
<description>PHP_CodeSniffer config for OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r</description> | ||
|
||
<!-- Path to inspected files --> | ||
<file>./</file> | ||
|
||
<!-- Don't need to inspect installed packages --> | ||
<exclude-pattern>./vendor</exclude-pattern> | ||
|
||
<!-- <basepath> A path to strip from the front of file paths inside reports --> | ||
<arg name="basepath" value="."/> | ||
|
||
<!-- colors Use colors in output --> | ||
<arg name="colors"/> | ||
|
||
<!-- Do not print warnings --> | ||
<!-- <arg name="warning-severity" value="0"/> --> | ||
|
||
<!-- -p Show progress of the run --> | ||
<!-- -s Show sniff codes in all reports --> | ||
<arg value="ps"/> | ||
|
||
<!-- Include the whole PSR12 standard --> | ||
<rule ref="PSR12"> | ||
<!-- There is no way to wrap generated comments, just disable that rule for now --> | ||
<exclude name="Generic.Files.LineLength.TooLong" /> | ||
<!-- Codegen generates variables with underscore on purpose --> | ||
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore" /> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.