adam-paterson / actions-m2-coding-standards

Github action to run PHPCBF on pull request changes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

actions-m2-coding-standards

Github action to run PHPCBF and PHPCS on pull request changes using Magento2 standards and commit changes to pull request.

Example usage:

- name: Run PHPCBF & PHPCS on Magento 2 repository
  id: phpcbf
  uses: pinpoint-unsworth94/actions-m2-coding-standards@master
  with:
      arguments: ${{ steps.file_filter.outputs.value }}
      php_version: '7.2' #default: 7.2 (7.1, 7.2, 7.3 supported)
- name: Print phpcbf output
  shell: bash
  run: |
    PHPCBF_OUTPUT="${{ steps.phpcbf.outputs.phpcbf_output }}"
    PHPCBF_OUTPUT="${PHPCBF_OUTPUT//'%25'/'%'}"
    PHPCBF_OUTPUT="${PHPCBF_OUTPUT//$'%0A'/'\n'}"å
    PHPCBF_OUTPUT="${PHPCBF_OUTPUT//$'%0D'/'\r'}"
    echo -e $PHPCBF_OUTPUT

About

Github action to run PHPCBF on pull request changes.


Languages

Language:Shell 58.6%Language:PHP 24.2%Language:JavaScript 13.4%Language:Dockerfile 3.9%