Skip to content

ale94lko/php-cs-fixer-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Coding Standards Fixer Action

License: MIT

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/php-cs-fixer-action@v1.0.1

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/php-cs-fixer-action@v1.0.1

Simple use with php-cs-fixer-version

  - name: PHP Code Style
    uses: ale94lko/php-cs-fixer-action@v1.0.1
+   with:
+     php-cs-fixer-version: v3.9.4

Simple use with rules-version

  - name: PHP Code Style
    uses: ale94lko/php-cs-fixer-action@v1.0.1
+   with:
+     rules-version: v1.0.1

Simple use with use-full-rules

  - name: PHP Code Style
    uses: ale94lko/php-cs-fixer-action@v1.0.1
+   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.