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

PHPCS runs on PR diff instead of project? #26

Closed GeoffreyDijkstra closed 4 years ago

GeoffreyDijkstra commented 4 years ago

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? :smiley:

MDaskalovAtBE commented 4 years ago

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

mrrobot47 commented 4 years ago

@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.