[policy, no patch] Discuss usage of @codeCoverageIgnore

Created on 30 March 2015, over 10 years ago
Updated 16 May 2025, about 2 months ago

Problem/Motivation

PHPUnit's code coverage tool is great, but unfortunately there is code that is:

a) either not unit testable [ procedural function call, external dependency, ... ]
b) a false positive like the ending line of an array according to Drupal's code standards.

As of now there are 2 functions using this annotation in Core.

Proposed resolution

Allow usage of @codeCoverageIgnore annotations on:

- classes
- class functions
- individual lines (for false positives)

Remaining tasks

- Discuss
- Change coding standards (if we want to do this)

User interface changes

- None

API changes

- None

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

base system

Created by

πŸ‡©πŸ‡ͺGermany Fabianx

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024