php-actions/phpstan

How to report issues on changed files/lines only?

rlorenzo opened this issue · 2 comments

I am using this action on a legacy project and it is producing a lot of noise because it 1864 errors. But is it possible to make this action only inspect the files/lines that were changed in the given commit/pull request only?

g105b commented

Hi @rlorenzo,

Yes sure, you can configure what you wish to test by adding a configuration file or via the paths input.

Your config file can be specified like this:

- name: PHPStan Static Analysis
      uses: php-actions/phpstan@v2
      with:
        configuration: your-config.neon

Or you can specify a list of paths like this:

- name: PHPStan Static Analysis
      uses: php-actions/phpstan@v2
      with:
        path: src/new/foldere src/another-new/folder

I hope this helps!

g105b commented

Please let me know if there's anything else I can help you with here and I'll open the issue again if necessary.