Back to directory
ale94lko avatar
ale94lko / php-cs-fixer-action

php-cs-fixer-action

Action to fix PHP Coding Standards

22

Stars

0

Forks

1

Watchers

MIT

License

PHP Coding Standards Fixer Action

License: MIT badge badge

A github action to fix PHP Coding Standards using php-cs-fixer.

Requirements

  • Be sure to have set the following before using the action
    - uses: actions/checkout@v2
    

Setup

  • Include the following in your action:
    - name: php-cs-fixer
      uses: ale94lko/[email protected]
    

Parameters

Name Description Required Default Values
php-cs-fixer-version Version of php-cs-fixer to download false v3.9.4 vX.X.X
rules-version Version of rules to check from php-cs-fixer-rules false v1.0.1 vX.X.X
use-full-rules Whether to use the full rules package or the minimal one false true true OR false

Examples

Simple use with default parameters

name: Fix code styles
on: [pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: PHP Code Style
        uses: ale94lko/[email protected]

Simple use with php-cs-fixer-version

  - name: PHP Code Style
    uses: ale94lko/[email protected]
+   with:
+     php-cs-fixer-version: v3.9.4

Simple use with rules-version

  - name: PHP Code Style
    uses: ale94lko/[email protected]
+   with:
+     rules-version: v1.0.1

Simple use with use-full-rules

  - name: PHP Code Style
    uses: ale94lko/[email protected]
+   with:
+     use-full-rules: true

View live

Contributing

Please read through our contributing guidelines.

License

php-cs-fixer-action is an open source project that is licensed under MIT.