Yuriy Belenko 5400a7e445 [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
2018-12-29 15:58:15 +09:00

31 lines
1.2 KiB
XML

<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OpenAPI Petstore Config" xsi:noNamespaceSchemaLocation="phpcs.xsd">
<description>PHP_CodeSniffer config for OpenAPI Petstore</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>