- PHP: ^8.0
- Composer: ^2.0
composer global require dragon-code/codestyler
codestyler check
codestyler fix
codestyler editorconfig
codestyler dependabot
Create a new .github/workflows/lint-check.yml
file and add the content to it:
name: "Code-Style Check"
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checking PHP Syntax
uses: TheDragonCode/php-codestyler@v1.6.0
Create a new .github/workflows/lint-fixer.yml
file and add the content to it:
name: "Code-Style Fix"
on:
push:
branches: [ main ]
jobs:
fix:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checking PHP Syntax
uses: TheDragonCode/php-codestyler@v1.6.0
with:
# Activates the mode of accepting changes with the creation
# of commits.
fix: true
# Activates the actualization of the `.editorconfig` file.
# Works only when the `fix` option is enabled.
editorconfig: true
# Activates Dependabot file processing.
# Works only when the `fix` option is enabled.
dependabot: true
By default, the linter scans all files in the current launch folder, except for folders such as vendor
, node_modules
and .github
.
- uses: TheDragonCode/php-codestyler@v1.6.0
By default, the linter only checks the code-style. If you want to apply the changes, then you need to activate this option:
- uses: TheDragonCode/php-codestyler@v1.6.0
with:
fix: true
By default, GitHub Action does not allow versioning, so our project will create a configuration file for it, which will check for new versions once a day.
When Dependabot detects new versions of containers, it will automatically create a PR to your repository. So you don't need to keep track of updates - Dependabot will do everything for you 💪😎
If the .github/dependabot.yml
file has already been created, we will check it and add the necessary rules. So don't be afraid, nothing will be deleted 😎
Note
Files will be created only if you have specified
fix: true
.Or you can manually run the Dependabot rule creation script by executing the
codestyler dependabot
command.
This package is licensed under the MIT License.