diff --git a/README.md b/README.md index ec6b81c..5d7088c 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # GitHub Action to run PHP_CodeSniffer of files changed in current PR or even on changed lines +This action was forked from the [tinovyatkin/action-php-codesniffer](https://github.com/tinovyatkin/action-php-codesniffer) + This action runs [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) on files changed in a Pull Request, by default annotating only lines changed by the PR author. So, it's fast and great to work with legacy code: ![annotations](.github/screenshot-phpcs-action.png) -Contrary to some existing solutions this actions works faster than Docker based actions (as it runs from Node.JS directly in the same VM) and runs only on changed files (good +Contrary to some existing solutions this actions works faster than Docker based actions (as it runs from Node.JS directly in the same VM) and runs only on changed files (good for big projects with some non-conform files as well as to gradually introduce code style). ## Usage @@ -36,7 +38,7 @@ jobs: curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar php phpcs.phar --version - - uses: tinovyatkin/action-php-codesniffer@v1 + - uses: thenabeel/action-phpcs@v8 with: files: "**.php" # you may customize glob as needed phpcs_path: php phpcs.phar @@ -45,4 +47,3 @@ jobs: You also will need either to pick a build code style standard or create `phpcs.xml` file (like [this](https://github.com/woocommerce/woocommerce/blob/master/phpcs.xml) for example). You may find all available configuration options at [action.yml](action.yml) in this repository. -Example of this action running over small change in big legacy codebase: https://github.com/tinovyatkin/woocommerce/pull/1/checks?check_run_id=642017335