次のように、phpcs.xml でいくつかのスニフが定義されています。
<rule ref="PSR2">
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed"/>
</rule>
私の意図は、CS ルールを段階的に強化することです (さらに多くの除外があります)。
ただし、CBF を実行しようとすると、同じスニフ名で失敗します。
$ ./vendor/bin/phpcbf --standard=PEAR --sniffs=Generic.Sniffs.ControlStructures.InlineControlStructure.NotAllowed path/to/code
生産:
エラー: 指定されたスニフ コード "Generic.Sniffs.ControlStructures.InlineControlStructure.NotAllowed" は無効です
phpcsで機能する場合、どのように無効になりますか? ドキュメントでマッピングまたは命名規則のマッピングが見つからないようです。
(「PEAR」、「PSR2」、「Generic」を標準として試しましたが、Generic.ControlStructures.InlineControlStructure.NotAllowed と同じように試しました)