Update readme

This commit is contained in:
Tjitse Efdé
2023-11-16 14:10:35 +01:00
parent 87fe77f8a8
commit 4a0794c67a
+14 -4
View File
@@ -1,15 +1,23 @@
# Magento 2 Coding Standard Action
A Github Action that runs the Magento Coding Standard.
This Github Action automates the enforcement of Magento Coding Standards. It ensures code consistency and quality by checking code against Magento's specific coding guidelines.
## Inputs
See the [action.yml](./action.yml)
For detailed descriptions of each input, refer to [action.yml](./action.yml).
## Usage
## Why a Baseline?
Running PHP CodeSniffer (PHPCS) with a baseline is crucial for managing legacy code. It allows you to set a "starting point" for code quality, ignoring existing issues while ensuring no new issues are introduced. This approach is especially useful for large codebases where addressing all existing issues at once is not feasible. The baseline serves as a record of known issues, enabling teams to focus on maintaining and gradually improving code quality in new or modified code.
## Usage Example
The following example demonstrates how to set up the action in your workflow:
Check how this action is used in mage-os [here](https://github.com/mage-os/mageos-magento2/blob/2.4-develop/.github/workflows/coding-standard-baseline.yml).
```yml
name: Coding Standard baseline
name: Coding Standard Baseline
on:
push:
@@ -25,6 +33,8 @@ jobs:
steps:
- uses: mage-os/github-actions/coding-standard-baseline@main
with:
head_repo: "mage-os/mageos-magento2"
head_ref: "main"
php_version: "8.2"
composer_version: "2"
version: "*"