Skip to content

Commit 0190f3e

Browse files
committed
Group lint-related commands together
Since we have so many lint-related commands now, it makes sense to group them together to it's easier to spot them.
1 parent bd48bdc commit 0190f3e

6 files changed

Lines changed: 13 additions & 13 deletions

File tree

.github/workflows/continuous-integration-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
run: composer install --prefer-dist
3131

3232
- name: Lint documentation files
33-
run: bin/console docs:lint
33+
run: bin/console lint:docs

.github/workflows/reuse.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ jobs:
3737
run: reuse lint
3838

3939
- name: Run SPDX conventions check
40-
run: bin/console spdx:lint
40+
run: bin/console lint:spdx

bin/console

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ declare(strict_types=1);
1111
require __DIR__ . '/../vendor/autoload.php';
1212

1313
use Respect\Dev\Commands\CreateMixinCommand;
14-
use Respect\Dev\Commands\DocsLintCommand;
14+
use Respect\Dev\Commands\LintDocsCommand;
1515
use Respect\Dev\Commands\SmokeTestsCheckCompleteCommand;
16-
use Respect\Dev\Commands\SpdxLintCommand;
16+
use Respect\Dev\Commands\LintSpdxCommand;
1717
use Respect\Dev\Commands\UpdateDomainSuffixesCommand;
1818
use Respect\Dev\Commands\UpdateDomainToplevelCommand;
1919
use Respect\Dev\Commands\UpdatePostalCodesCommand;
@@ -34,19 +34,19 @@ return (static function () {
3434

3535
$application = new Application('Respect/Validation', '3.0');
3636
$application->addCommand(new CreateMixinCommand());
37-
$application->addCommand(new DocsLintCommand($differ, new CompositeLinter(
37+
$application->addCommand(new LintDocsCommand($differ, new CompositeLinter(
3838
new AssertionMessageLinter(),
3939
new ValidatorHeaderLinter(),
4040
new ValidatorIndexLinter(),
4141
new ValidatorRelatedLinter(),
4242
new ValidatorTemplatesLinter(),
4343
new ValidatorChangelogLinter(),
4444
)));
45+
$application->addCommand(new LintSpdxCommand());
4546
$application->addCommand(new UpdateDomainSuffixesCommand());
4647
$application->addCommand(new UpdateDomainToplevelCommand());
4748
$application->addCommand(new UpdatePostalCodesCommand());
4849
$application->addCommand(new SmokeTestsCheckCompleteCommand());
49-
$application->addCommand(new SpdxLintCommand());
5050

5151
return $application->run();
5252
})();

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@
7676
"scripts": {
7777
"bench-profile": "vendor/bin/phpbench xdebug:profile",
7878
"bench": "vendor/bin/phpbench run",
79-
"docs-fix": "bin/console docs:lint --fix",
80-
"docs": "bin/console docs:lint",
79+
"docs-fix": "bin/console lint:docs --fix",
80+
"docs": "bin/console lint:docs",
8181
"pest": "vendor/bin/pest --testsuite=feature --compact",
8282
"phpcs": "vendor/bin/phpcs",
8383
"phpstan": "vendor/bin/phpstan analyze",
8484
"phpunit": "vendor/bin/phpunit --testsuite=unit",
8585
"smoke-complete": "bin/console smoke-tests:check-complete",
86-
"spdx-lint": "bin/console spdx:lint",
86+
"spdx-lint": "bin/console lint:spdx",
8787
"qa": [
8888
"@spdx-lint",
8989
"@phpcs",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
use function sprintf;
2525

2626
#[AsCommand(
27-
name: 'docs:lint',
27+
name: 'lint:docs',
2828
description: 'Apply documentation linters and optionally auto-fix issues',
2929
)]
30-
final class DocsLintCommand extends Command
30+
final class LintDocsCommand extends Command
3131
{
3232
public function __construct(
3333
private readonly Differ $differ,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
use function trim;
3030

3131
#[AsCommand(
32-
name: 'spdx:lint',
32+
name: 'lint:spdx',
3333
description: 'Apply SPDX linters to source and documentation files',
3434
)]
35-
final class SpdxLintCommand extends Command
35+
final class LintSpdxCommand extends Command
3636
{
3737
public const array HEADERS = [
3838
'License-Identifier: MIT',

0 commit comments

Comments
 (0)