Download the PHP package sspooky13/yaml-alphabetical-checker without Composer
On this page you can find all versions of the php package sspooky13/yaml-alphabetical-checker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sspooky13/yaml-alphabetical-checker
More information about sspooky13/yaml-alphabetical-checker
Files in sspooky13/yaml-alphabetical-checker
Package yaml-alphabetical-checker
Short Description YAML alphabetical checker
License MIT
Homepage https://github.com/sspooky13/yaml-alphabetical-checker
Informations about the package yaml-alphabetical-checker
YAML alphabetical checker
This repository is unmaintained and deprecated. I recommend yaml standards repository
This library helps you to keep YAML files alphabetically sorted.
Requirements
Works with minimal requirement:
- PHP 5.6 or higher
- symfony/console version 3.0
- symfony/yaml version 3.0
- sebastian/diff version 1.4
Installation
If you prefer using Composer you can easily install with the following command:
composer require --dev sspooky13/yaml-alphabetical-checker
Or alternatively, include a dependency for sspooky13/yaml-alphabetical-checker in your composer.json file. For example:
Options for run
--exclude=text
Exclude file contains thetext
in name. Can be used more times.
Usage
For run from command line:
./bin/yaml-alphabetical-checker ./app ./src/path/to/config/file.yml ./src --exclude=serv --exclude=conf
If you need exclude a files from check, you can print command --exclude=NAME
how much you want.
or setting for ANT:
PHPStorm Integration
You can integrate YAML alphabetical checker into PHPStorm by using File Watcher.
- Open Settings -> Tools -> File Watchers
- Add new -> custom
- Give it a name
- Select file type:
YAML
- Program:
\vendor\bin\yaml-alphabetical-checker.bat
- Arguments:
$FilePath$
for check actual opened file or$SourcepathEntry$
for check all source file, etc.
Now, file watcher check YAML files, whether is right alphabetically sorted and will open the console if they have errors
Exit codes
Exit code is built using following bit flags:
0 OK.
1 Some file is unsorted.
2 General error (file is not readable, error with parse yaml file).
All versions of yaml-alphabetical-checker with dependencies
symfony/console Version ~3.0
symfony/yaml Version ~3.0
sebastian/diff Version ~1.4