-
-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Labels
Type: EnhancementRequest for additions or changes that improve existing functionality.Request for additions or changes that improve existing functionality.
Description
Feature
I'd like to add code to mago so that integration with pre-commit.com style hooks is easier. pre-commit is a framework for managing and maintaining multi-language pre-commit hooks. One of the supported languages is rust, which mago is written in.
Since the mago git repo results in an installable package or exposes an executable, it can be used with pre-commit. All that is required in the repo is too a small YAML file .pre-commit-hooks.yaml . An example would be something like so:
---
# mago pre-commit-hooks
- id: mago-lint
name: mago lint
description: Lint using mago an extremely fast PHP linter, formatter, and static analyzer, written in Rust.
entry: mago lint
language: rust
types: [php]
- id: mago-fmt
name: mago fmt
description: format files using mago an extremely fast PHP linter, formatter, and static analyzer, written in Rust.
entry: mago fmt
language: rust
types: [php]Example
pre-commit run mago-lint --verbose --all-files
pre-commit run mago-fmt --verbose --all-filesMetadata
Metadata
Assignees
Labels
Type: EnhancementRequest for additions or changes that improve existing functionality.Request for additions or changes that improve existing functionality.