mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-08 19:46:41 +00:00
Update readme
This commit is contained in:
@@ -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: "*"
|
||||
|
||||
Reference in New Issue
Block a user