diff --git a/.github/workflows/continuous-integration-docs.yml b/.github/workflows/continuous-integration-docs.yml index 5b68d20e..b98424ec 100644 --- a/.github/workflows/continuous-integration-docs.yml +++ b/.github/workflows/continuous-integration-docs.yml @@ -30,4 +30,4 @@ jobs: run: composer install --prefer-dist - name: Lint documentation files - run: bin/console docs:lint + run: bin/console lint:docs diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index 6746a58d..00258ca8 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -37,4 +37,4 @@ jobs: run: reuse lint - name: Run SPDX conventions check - run: bin/console spdx:lint + run: bin/console lint:spdx diff --git a/bin/console b/bin/console index 07c4898f..439b20a2 100755 --- a/bin/console +++ b/bin/console @@ -11,9 +11,9 @@ declare(strict_types=1); require __DIR__ . '/../vendor/autoload.php'; use Respect\Dev\Commands\CreateMixinCommand; -use Respect\Dev\Commands\DocsLintCommand; +use Respect\Dev\Commands\LintDocsCommand; use Respect\Dev\Commands\SmokeTestsCheckCompleteCommand; -use Respect\Dev\Commands\SpdxLintCommand; +use Respect\Dev\Commands\LintSpdxCommand; use Respect\Dev\Commands\UpdateDomainSuffixesCommand; use Respect\Dev\Commands\UpdateDomainToplevelCommand; use Respect\Dev\Commands\UpdatePostalCodesCommand; @@ -34,7 +34,7 @@ return (static function () { $application = new Application('Respect/Validation', '3.0'); $application->addCommand(new CreateMixinCommand()); - $application->addCommand(new DocsLintCommand($differ, new CompositeLinter( + $application->addCommand(new LintDocsCommand($differ, new CompositeLinter( new AssertionMessageLinter(), new ValidatorHeaderLinter(), new ValidatorIndexLinter(), @@ -42,11 +42,11 @@ return (static function () { new ValidatorTemplatesLinter(), new ValidatorChangelogLinter(), ))); + $application->addCommand(new LintSpdxCommand()); $application->addCommand(new UpdateDomainSuffixesCommand()); $application->addCommand(new UpdateDomainToplevelCommand()); $application->addCommand(new UpdatePostalCodesCommand()); $application->addCommand(new SmokeTestsCheckCompleteCommand()); - $application->addCommand(new SpdxLintCommand()); return $application->run(); })(); diff --git a/composer.json b/composer.json index 393ca24b..cbf651c2 100644 --- a/composer.json +++ b/composer.json @@ -76,14 +76,14 @@ "scripts": { "bench-profile": "vendor/bin/phpbench xdebug:profile", "bench": "vendor/bin/phpbench run", - "docs-fix": "bin/console docs:lint --fix", - "docs": "bin/console docs:lint", + "docs-fix": "bin/console lint:docs --fix", + "docs": "bin/console lint:docs", "pest": "vendor/bin/pest --testsuite=feature --compact", "phpcs": "vendor/bin/phpcs", "phpstan": "vendor/bin/phpstan analyze", "phpunit": "vendor/bin/phpunit --testsuite=unit", "smoke-complete": "bin/console smoke-tests:check-complete", - "spdx-lint": "bin/console spdx:lint", + "spdx-lint": "bin/console lint:spdx", "qa": [ "@spdx-lint", "@phpcs", diff --git a/src-dev/Commands/DocsLintCommand.php b/src-dev/Commands/LintDocsCommand.php similarity index 96% rename from src-dev/Commands/DocsLintCommand.php rename to src-dev/Commands/LintDocsCommand.php index 0c79c9ed..239e8be6 100644 --- a/src-dev/Commands/DocsLintCommand.php +++ b/src-dev/Commands/LintDocsCommand.php @@ -24,10 +24,10 @@ use function dirname; use function sprintf; #[AsCommand( - name: 'docs:lint', + name: 'lint:docs', description: 'Apply documentation linters and optionally auto-fix issues', )] -final class DocsLintCommand extends Command +final class LintDocsCommand extends Command { public function __construct( private readonly Differ $differ, diff --git a/src-dev/Commands/SpdxLintCommand.php b/src-dev/Commands/LintSpdxCommand.php similarity index 97% rename from src-dev/Commands/SpdxLintCommand.php rename to src-dev/Commands/LintSpdxCommand.php index 8968ffe0..91dc3759 100644 --- a/src-dev/Commands/SpdxLintCommand.php +++ b/src-dev/Commands/LintSpdxCommand.php @@ -29,10 +29,10 @@ use function sprintf; use function trim; #[AsCommand( - name: 'spdx:lint', + name: 'lint:spdx', description: 'Apply SPDX linters to source and documentation files', )] -final class SpdxLintCommand extends Command +final class LintSpdxCommand extends Command { public const array HEADERS = [ 'License-Identifier: MIT',