Files
github-actions-magento2/coding-standard
Damien Retzinger 4e21b18ee9 feat(coding-standard): add ignore_warnings flag (#147)
By default, `phpcs` exits with a non-zero exit code when it finds warnings. We keep that default, but allow changing it.

Co-authored-by: Vitaliy Golomoziy <vitaliy.golomoziy@gmail.com>
2023-09-21 08:40:58 -04:00
..

Magento 2 Coding Standard Action

A Github Action that runs the Magento Coding Standard.

Inputs

See the action.yml

Usage

name: Coding Standard

on:
  push:
    branches:
    - main
  pull_request:
    branches:
    - main

jobs:
  coding-standard:
    runs-on: ubuntu-latest
    steps:
    - uses: mage-os/github-actions/coding-standard@main
      with:
        version: 25 # Optional, will use the latest if omitted.
        path: app/code # Optional, will be used when event is not a pull request.
        severity: 8 # Optional, will use phpcs default of 5 if not specified.
        warning_severity: 4 # Optional, will use severity value if not specified.
        error_severity: 7 # Optional, will use severity value if not specified.