rtCamp/action-phpcs-code-review

PHPCS runs on PR diff instead of project?

GeoffreyDijkstra opened this issue · 2 comments

When using this action yml file:

name: Test
on: pull_request
jobs:
  phpcs:
    name: PHP Code Sniffer
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          ref: ${{ github.event.pull_request.head.sha }}
      - uses: docker://rtcamp/action-phpcs-code-review:v2.0.0
        env:
          GH_BOT_TOKEN: ${{ secrets.COMPOSER_TOKEN }}

According to your readme phpcs is run only on the files in the pull request diff, is it also possible to run it on the entire code base? Can you maybe add a flag or so for this? 😃

If you create your own phpcs.xml file and specify the root folder it will check them all ignoring the configuration you specify in the yml

@GeoffreyDijkstra this action is a GitHub action based on vip-go-ci

As mentioned in the limitations: https://github.com/rtCamp/action-phpcs-code-review/#limitations
It is not possible right now to run it on the entire project.

This action is built to comment on issues found in code inside a PR. If run over the entire project, it will find phpcs issues for files that may not be there in the PR as well, but then it will not be able to request changes for them and will fail.

This action is built with the purpose to request changes on phpcs issue found in PR, so running on entire project will not be added. It is not in the roadmap for now.