Skip to content

Scan files being erroneously scanned #35

@dannydover

Description

@dannydover

First off, thank you for building this! This has been working great for me and is really helping my codebase stay up-to-par.

However, I am running into one reoccurring issue. About 1/4 of the time when this runs automatically after opening a pull request, I receive the following error:

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

"phpcs-scan-Ysewvc.php" -- As you might expect, the filename changes each time this occurs (characters after the second hyphen differ):

Is there a way to either ignore these phpcs scan files or fix the root cause of this issue?

For context, I have included my workflow file below:

# Original Documentation https://github.com/rtCamp/action-phpcs-code-review

on: pull_request

name: Code Quality
jobs:
  runPHPCSInspection:
    name: Run PHPCS linter
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        ref: ${{ github.event.pull_request.head.sha }}
    - name: Run PHPCS inspection
      uses: rtCamp/action-phpcs-code-review@v2.0.2
      env:
        GH_BOT_TOKEN: ${{ secrets.GH_CICD_BOT }}
        SKIP_FOLDERS: "tests,.github,cypress"
      with:
        args: "WordPress,WordPress-Core,WordPress-Docs"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions