Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to update PHP_CodeSniffer config with .phpcs.xml.dist #173

Open
HugoHeneault opened this issue Feb 14, 2025 · 0 comments
Open

Unable to update PHP_CodeSniffer config with .phpcs.xml.dist #173

HugoHeneault opened this issue Feb 14, 2025 · 0 comments

Comments

@HugoHeneault
Copy link

HugoHeneault commented Feb 14, 2025

Hi there,

As stated in README, I created a .phpcs.xml.dist

Containing:

<?xml version="1.0"?>
<ruleset>
    <file>app</file>
    <file>config</file>
    <file>public</file>
    <file>resources</file>
    <file>routes</file>
    <file>tests</file>

    <rule ref="Tighten"/>
</ruleset>

(note that I just removed the "database" folder for testing, but I could have added a rule or changed something else)

But database is still scanned and errors detected inside when I run

./vendor/bin/duster fix
 => Fixing using TLint 
 >> success: No issues found. 
 >> success: Checking for any remaining issues after fixing... 
 >> success: No issues found. 
 => Fixing using PHP_CodeSniffer 
......................................................... 57 / 57 (100%)



No fixable errors were found

Time: 80ms; Memory: 25.5MB

......................................................... 57 / 57 (100%)



PHP CODE SNIFFER REPORT SUMMARY
---------------------------------------------------------------------------------------------
FILE                                                                         ERRORS  WARNINGS
---------------------------------------------------------------------------------------------
some-api/database/seeders/UserSeeder.php     2       0
---------------------------------------------------------------------------------------------
A TOTAL OF 2 ERRORS AND 0 WARNINGS WERE FOUND IN 57 FILES
---------------------------------------------------------------------------------------------

 !! error: PHP Code_Sniffer found errors that cannot be fixed automatically. 
 => Fixing using PHP CS Fixer 


  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Laravel  
    PASS   ......................................................................................................................................................... 78 files  

 => Fixing using Pint 

  .......................................................................

  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Laravel  
    PASS   ......................................................................................................................................................... 71 files  


What am I doing wrong?

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant