Skip to content

extension seems to ignore phpcs.xml #17

@alberto-bottarini

Description

@alberto-bottarini

PHP example file:

<?php

namespace My\App;

class Foo
{
    public function getFoo()
    {
        echo 1;
    }

}

PHPCS.XML:

<?xml version="1.0"?>
<ruleset name="MyStandard">
 <rule ref="PSR2" />
 <rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
   <severity>0</severity>
 </rule>
</ruleset>

If I run, using shell phpcs myfile.php I get, correctly:

 12 | ERROR | [x] The closing brace for the class must go on the next line after the body

Running phpcbf app/User.php, will fix my file:

FILE                                                       FIXED  REMAINING
---------------------------------------------------------------------------
/home/abottarini/Develop/homestead/quizzy/app/User.php     1      0

The same fix won't do if I run phpcbf inside my Visual Studio, while phpcs extension is underling my error line in red.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions