8000 [Yaml] Add bin/lint for using the LintCommand by chalasr · Pull Request #19916 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Yaml] Add bin/lint for using the LintCommand #19916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
< 8000 div data-target="diff-layout.mainContainer" data-view-component="true" class="Layout-main">
[Yaml] Add bin/lint for using the LintCommand
  • Loading branch information
chalasr committed Sep 12, 2016
commit 23be20ba00407c2a2dcc6500d98bb57a1470588a
28 changes: 28 additions & 0 deletions src/Symfony/Component/Yaml/bin/lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env php
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

require_once __DIR__.'/vendor/autoload.php';

use Symfony\Component\Console\Application;
use Symfony\Component\Yaml\Command\LintCommand;

if (!class_exists(Application::class)) {
fwrite(STDERR, 'The "symfony/console" package must be installed.'.PHP_EOL);

exit(1);
}

(new Application('symfony/yaml'))
->add(new LintCommand())
->getApplication()
->setDefaultCommand('lint:yaml', true)
->run();
6 changes: 6 additions & 0 deletions src/Symfony/Component/Yaml/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"conflict": {
"symfony/console": "<3.2"
},
"autoload": {
"psr-4": { "Symfony\\Component\\Yaml\\": "" },
"exclude-from-classmap": [
"/Tests/"
]
},
"bin": [
"bin/lint"
],
"minimum-stability": "dev",
"extra": {
"branch-alias": {
Expand Down
0