Add support *showOnlySummary* from SebastianBergmann\CodeCoverage\Report\Facade::renderText()

Open Beginner friendly
#6,949 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
php
Domain
testing

Research direction

Start in Codeception\Coverage\Subscriber\Printer::printConsole() and compare its FacadeReport::renderText() call with the five-argument signature described in the issue. Check the resulting console coverage output against the attached example; done means the unwanted report text is removed while the requested summary output remains available.

Written by the indexing model from the issue text.

Description

You codebase:

File: Codeception\Coverage\Subscriber\Printer

    protected function printConsole(): void
    {
        if (class_exists(FacadeReport::class)) {
            $writer = FacadeReport::fromObject(self::$coverage);
            $this->output->write($writer->renderText(null, showColors: $this->options['colors']));
        } else {
            $writer = $this->createTextWriter();
            $this->output->write($writer->process(self::$coverage, $this->options['colors']));
        }
    }

FacadeReport::renderText signature support 5 arguments:

  • $target,
  • ?Thresholds $thresholds = null,
  • bool $showUncoveredFiles = false,
  • bool $showOnlySummary = false,
  • bool $showColors,

Your code - 2 arguments:

  • $target,
  • bool $showColors,

General point - remove some report text:

Image
Dominant language
PHP
Stars
4.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Codeception/Codeception

All issues in Codeception/Codeception

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.