mirror of
https://github.com/Respect/Validation.git
synced 2026-03-14 22:35:45 +01:00
Since we have so many lint-related commands now, it makes sense to group them together to it's easier to spot them.
52 lines
2 KiB
PHP
Executable file
52 lines
2 KiB
PHP
Executable file
#!/usr/bin/env php
|
|
<?php
|
|
|
|
/*
|
|
* SPDX-License-Identifier: MIT
|
|
* SPDX-FileCopyrightText: (c) Respect Project Contributors
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
use Respect\Dev\Commands\CreateMixinCommand;
|
|
use Respect\Dev\Commands\LintDocsCommand;
|
|
use Respect\Dev\Commands\SmokeTestsCheckCompleteCommand;
|
|
use Respect\Dev\Commands\LintSpdxCommand;
|
|
use Respect\Dev\Commands\UpdateDomainSuffixesCommand;
|
|
use Respect\Dev\Commands\UpdateDomainToplevelCommand;
|
|
use Respect\Dev\Commands\UpdatePostalCodesCommand;
|
|
use Respect\Dev\Markdown\CompositeLinter;
|
|
use Respect\Dev\Markdown\Differ as MarkdownDiffer;
|
|
use Respect\Dev\Markdown\Linters\AssertionMessageLinter;
|
|
use Respect\Dev\Markdown\Linters\ValidatorHeaderLinter;
|
|
use Respect\Dev\Markdown\Linters\ValidatorIndexLinter;
|
|
use Respect\Dev\Markdown\Linters\ValidatorRelatedLinter;
|
|
use Respect\Dev\Markdown\Linters\ValidatorTemplatesLinter;
|
|
use Respect\Dev\Markdown\Linters\ValidatorChangelogLinter;
|
|
use SebastianBergmann\Diff\Differ;
|
|
use SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder;
|
|
use Symfony\Component\Console\Application;
|
|
|
|
return (static function () {
|
|
$differ = new MarkdownDiffer(new Differ(new UnifiedDiffOutputBuilder('', addLineNumbers: true)));
|
|
|
|
$application = new Application('Respect/Validation', '3.0');
|
|
$application->addCommand(new CreateMixinCommand());
|
|
$application->addCommand(new LintDocsCommand($differ, new CompositeLinter(
|
|
new AssertionMessageLinter(),
|
|
new ValidatorHeaderLinter(),
|
|
new ValidatorIndexLinter(),
|
|
new ValidatorRelatedLinter(),
|
|
new ValidatorTemplatesLinter(),
|
|
new ValidatorChangelogLinter(),
|
|
)));
|
|
$application->addCommand(new LintSpdxCommand());
|
|
$application->addCommand(new UpdateDomainSuffixesCommand());
|
|
$application->addCommand(new UpdateDomainToplevelCommand());
|
|
$application->addCommand(new UpdatePostalCodesCommand());
|
|
$application->addCommand(new SmokeTestsCheckCompleteCommand());
|
|
|
|
return $application->run();
|
|
})();
|