2017 © Pedro Peláez
 

library yaml-alphabetical-checker

YAML alphabetical checker

image

sspooky13/yaml-alphabetical-checker

YAML alphabetical checker

  • Thursday, April 26, 2018
  • by sspooky13
  • Repository
  • 0 Watchers
  • 3 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

YAML alphabetical checker

Latest Stable Version Total Downloads Build Status Build status, (*1)

This repository is unmaintained and deprecated. I recommend yaml standards repository

This library helps you to keep YAML files alphabetically sorted., (*2)

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, (*3)

Installation

If you prefer using Composer you can easily install with the following command:, (*4)

composer require --dev sspooky13/yaml-alphabetical-checker

Or alternatively, include a dependency for sspooky13/yaml-alphabetical-checker in your composer.json file. For example:, (*5)

{
    "require-dev": {
        "sspooky13/yaml-alphabetical-checker": "~2.0"
    }
}

Options for run

  • --exclude=text Exclude file contains the text in name. Can be used more times.

Usage

For run from command line:, (*6)

./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., (*7)

or setting for ANT:, (*8)

<property name="path.yaml-alphabetical-checker" value="./vendor/bin/yaml-alphabetical-checker"/>

<target name="yaml-alphabetical-checker" description="Run yaml alphabetical checker">
    <exec 
        executable="${path.yaml-alphabetical-checker}"
        logoutput="true"
        passthru="true"
        checkreturn="true"
    >
        <arg value="./app" />
        <arg value="./src/path/to/config/file.yml" />
        <arg value="./src" />
        <arg value="--exclude=serv" />
        <arg value="--exclude=conf" />
    </exec>
</target>

PHPStorm Integration

You can integrate YAML alphabetical checker into PHPStorm by using File Watcher., (*9)

  1. Open Settings -> Tools -> File Watchers
  2. Add new -> custom
  3. Give it a name
  4. Select file type: YAML
  5. Program: \vendor\bin\yaml-alphabetical-checker.bat
  6. 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, (*10)

Exit codes

Exit code is built using following bit flags:, (*11)

0 OK.
1 Some file is unsorted.
2 General error (file is not readable, error with parse yaml file).

The Versions

26/04 2018

dev-devel-3

dev-devel-3 https://github.com/sspooky13/yaml-alphabetical-checker

YAML alphabetical checker

  Sources   Download

MIT

The Requires

 

The Development Requires

by Peter Turek

yaml checker alphabetical

19/03 2018

dev-devel-2

dev-devel-2 https://github.com/sspooky13/yaml-alphabetical-checker

YAML alphabetical checker

  Sources   Download

MIT

The Requires

 

The Development Requires

by Peter Turek

yaml checker alphabetical

27/01 2018

dev-master

9999999-dev https://github.com/sspooky13/yaml-alphabetical-checker

YAML alphabetical checker

  Sources   Download

MIT

The Requires

 

The Development Requires

by Peter Turek

yaml checker alphabetical

18/11 2017

2.0.0

2.0.0.0 https://github.com/sspooky13/yaml-alphabetical-checker

YAML alphabetical checker

  Sources   Download

MIT

The Requires

 

The Development Requires

by Peter Turek

yaml checker alphabetical

05/11 2017

dev-devel-1

dev-devel-1 https://github.com/sspooky13/yaml-alphabetical-fixer

YAML alphabetical checker and fixer

  Sources   Download

MIT

The Requires

 

The Development Requires

by Peter Turek

yaml checker fixer alphabetical

05/11 2017

1.0.1

1.0.1.0 https://github.com/sspooky13/yaml-alphabetical-fixer

YAML alphabetical checker and fixer

  Sources   Download

MIT

The Requires

 

The Development Requires

by Peter Turek

yaml checker fixer alphabetical

04/11 2017

1.0.0

1.0.0.0 https://github.com/sspooky13/yaml-alphabetical-fixer

YAML alphabetical checker and fixer

  Sources   Download

MIT

The Requires

 

The Development Requires

by Peter Turek

yaml checker fixer alphabetical