rtCamp/action-phpcs-code-review

Error: Filenames should be all lowercase with hyphens as word separators.

w3bdesign opened this issue · 3 comments

Getting the following error:

 Error: Filenames should be all lowercase with hyphens as word separators. Expected phpcs-scan-omtoxh.php, but found phpcs-scan-omTOXH.php (WordPress.Files.FileName.NotHyphenatedLowercase).

My filename is inde-xer.php

Is this a bug or am I misunderstanding something here?

That is a known issue, it is happening because vip-go-ci, the core part of this action takes the diff. of PR and puts it in a temp file. That temp file name causes this issue.

This bug will be fixed soon. Till then, please add your phpcs rulsets in phpcs.xml file in the root of your repository. That phpcs.xml will be taken into consideration while running phpcs. You can use this phpcs.xml as a base which ignores the NotHyphenatedLowercase error and add other rulesets you want for your project in it.

That fixed the issue, thanks.

Any ETA on when this will be fixed? I see the workaround, but would prefer to keep that rule in place as it is useful.

Alternatively, is there a way to ignore all filenames that match phpcs-scan-*

Thank you.