Skip to content

Commit

Permalink
fix: remove lint:pds from lint:all
Browse files Browse the repository at this point in the history
  • Loading branch information
ramsey committed Jul 14, 2021
1 parent 43be538 commit ec3d98f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
11 changes: 3 additions & 8 deletions src/Composer/Command/LintCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,31 +58,26 @@ protected function configure(): void

protected function doExecute(InputInterface $input, OutputInterface $output): int
{
$lintPds = $this->getApplication()->find($this->withPrefix('lint:pds'));
$lintSyntax = $this->getApplication()->find($this->withPrefix('lint:syntax'));
$lintStyle = $this->getApplication()->find($this->withPrefix('lint:style'));

$output->writeln(['', sprintf('<comment>Executing %s</comment>', (string) $lintPds->getName())]);
$lintPdsExit = $lintPds->run($input, $output);

$output->writeln(['', sprintf('<comment>Executing %s</comment>', (string) $lintSyntax->getName())]);
$lintSyntaxExit = $lintSyntax->run($input, $output);

$output->writeln(['', sprintf('<comment>Executing %s</comment>', (string) $lintStyle->getName())]);
$lintStyleExit = $lintStyle->run($input, $output);

return $lintPdsExit + $lintSyntaxExit + $lintStyleExit;
return $lintSyntaxExit + $lintStyleExit;
}

private function getHelpText(): string
{
$lintPds = $this->withPrefix('lint:pds');
$lintSyntax = $this->withPrefix('lint:syntax');
$lintStyle = $this->withPrefix('lint:style');

return <<<EOD
<info>%command.name%</info> executes the <info>{$lintPds}</info>, <info>{$lintSyntax}</info>,
and <info>{$lintStyle}</info> commands.
<info>%command.name%</info> executes the <info>{$lintSyntax}</info> and <info>{$lintStyle}</info>
commands.
Since this command executes multiple commands, it is not possible
to pass additional arguments to the commands. You may, however,
Expand Down
13 changes: 0 additions & 13 deletions tests/Composer/Command/LintCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ public function testIsProxyCommand(): void

public function testRun(): void
{
/** @var Command & MockInterface $commandLintPds */
$commandLintPds = $this->mockery(
Command::class,
[
'getName' => 'pds',
'run' => 0,
],
);

/** @var Command & MockInterface $commandLintSyntax */
$commandLintSyntax = $this->mockery(
Command::class,
Expand Down Expand Up @@ -72,10 +63,6 @@ public function testRun(): void
],
);
$application->shouldReceive('getDefinition')->passthru();
$application
->expects()
->find($this->command->withPrefix('lint:pds'))
->andReturn($commandLintPds);
$application
->expects()
->find($this->command->withPrefix('lint:syntax'))
Expand Down

0 comments on commit ec3d98f

Please sign in to comment.