Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#43240 closed enhancement (fixed)

Exclude third-party code from code coverage reports

Reported by: schlessera Owned by: johnbillion
Priority: normal Milestone: 5.1
Component: Build/Test Tools Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

The code coverage currently runs over all files indiscriminately.

For meaningful code coverage reports, we should exclude third-party code, as suggested by @johnbillion in #43067.

The list can be taken from PHPCS exclusion list we already have in Core: ​https://github.com/WordPress/wordpress-develop/blob/b9b2f2a79d3506a74e3c3ce34de69ed069864dfe/phpcs.xml.dist#L16

Attachments (1)

43240.diff​ (1.7 KB ) - added by schlessera 9 years ago.
Exclusion list taken from PHPCS exclusions

Download all attachments as: .zip

Change History (7)

@schlessera
9 years ago

Exclusion list taken from PHPCS exclusions

#1 @schlessera
9 years ago

  • Keywords has-patch added

Attached a patch that is based on the exclusions already found in ​https://github.com/WordPress/wordpress-develop/blob/b9b2f2a79d3506a74e3c3ce34de69ed069864dfe/phpcs.xml.dist#L16 .

NOTE: For this to actually work in tests, #43067 needs to already be applied as well.

#2 @johnbillion
9 years ago

  • Milestone Awaiting Review → 5.0
  • Owner set to johnbillion
  • Status new → accepted

#3 @johnbillion
9 years ago

  • Resolution → fixed
  • Status accepted → closed

In 42665:

Build/Test Tools: Allow code coverage reports to be generated.

This corrects the attribute needed to allow PHPUnit to generate coverage reports, and also adds a blacklist of files and directories that are excluded from coverage reports.

Props schlessera, jipmoors

Fixes #43067, #43240

#4 @johnbillion
9 years ago

In 42666:

Build/Test Tools: Allow code coverage reports to be generated.

This corrects the attribute needed to allow PHPUnit to generate coverage reports, and also adds a blacklist of files and directories that are excluded from coverage reports.

Props schlessera, jipmoors

See #43067, #43240

Merges [42665] to the 4.9 branch.

#5 @jorbin
8 years ago

  • Milestone 5.0 → 5.1

This ticket was mentioned in ​Slack in #core by desrosj. ​View the logs.


8 years ago

Note: See TracTickets for help on using tickets.