Skip to content

Commit

Permalink
add skip file to commented code check (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba authored Dec 15, 2024
1 parent ff8148d commit 67ed539
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Command/CheckCommentedCodeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ protected function configure(): void
InputArgument::REQUIRED | InputArgument::IS_ARRAY,
'One or more paths to check'
);
$this->addOption('skip-file', null, InputOption::VALUE_REQUIRED, 'Skip file path');
$this->setDescription('Checks code for commented snippets');

$this->addOption(
Expand All @@ -50,7 +51,9 @@ protected function configure(): void
protected function execute(InputInterface $input, OutputInterface $output): int
{
$sources = (array) $input->getArgument('sources');
$phpFileInfos = PhpFilesFinder::find($sources);
$skipFiles = (array) $input->getOption('skip-file');

$phpFileInfos = PhpFilesFinder::find($sources, $skipFiles);

$message = sprintf('Analysing %d *.php files', count($phpFileInfos));
$this->symfonyStyle->note($message);
Expand Down

0 comments on commit 67ed539

Please sign in to comment.