Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmvdbrugge/fixer-prio-graph
Build a priority graph for PHP-CS-Fixer's fixers
https://github.com/dmvdbrugge/fixer-prio-graph
graph graphviz php-cs-fixer priority priority-graph
Last synced: 3 months ago
JSON representation
Build a priority graph for PHP-CS-Fixer's fixers
- Host: GitHub
- URL: https://github.com/dmvdbrugge/fixer-prio-graph
- Owner: dmvdbrugge
- License: mit
- Created: 2018-10-27T10:49:47.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-26T13:59:16.000Z (almost 6 years ago)
- Last Synced: 2023-08-22T15:40:04.139Z (over 1 year ago)
- Topics: graph, graphviz, php-cs-fixer, priority, priority-graph
- Language: PHP
- Homepage:
- Size: 5.82 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fixer-prio-graph
Build a priority graph for [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)'s fixers.## The Graph
(Click for full-size image)
[![The Graph](graphs/51209a633d-thumb.png "The Graph")](graphs/51209a633d.png?raw=true)## Explanation
PHP-CS-Fixer has rules, implemented as _fixers_. Those fixers (can) have a priority, to determine which fixer has to run
before or after certain other fixers. Each defined priority-relation is shown here, as
```
( rule_alpha (priority) )--->( rule_beta (priority) )--->( rule_gamma (priority) )
```
meaning that rule alpha has to run before rule beta which in turn has to run before rule gamma, which is enforced by the
fact that alpha's priority is bigger than beta's which in turn is bigger than gamma's.## Usage
First make sure to have the latest PHP-CS-Fixer master, and then run the script. As single command:
```
composer update && php fixer-prio-graph.php
```
The script will open the newly created graph in the image viewer defined by your OS.## Installation
Just `git clone` the repo.It depends on [Graphviz](http://www.graphviz.org/) to generate the image, for installation see
[their download page](https://graphviz.gitlab.io/download/).(Hint for mac: `brew install graphviz`)
## License
MIT LicenseCopyright (c) 2018-2019 Dave van der Brugge