rtCamp / action-phpcs-code-review

Github Action to perform automated code review on pull requests
https://github.com/rtCamp/github-actions-library
MIT License
103 stars 27 forks source link

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

Closed w3bdesign closed 4 years ago

w3bdesign commented 4 years ago

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?

mrrobot47 commented 4 years ago

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.

w3bdesign commented 4 years ago

That fixed the issue, thanks.

dannydover commented 4 years ago

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.