Skip to content

Allow per directory coverage override #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jul 1, 2022

Conversation

frankdekker
Copy link
Member

Added <directory path="directory/path/" min="85"/> property to phpfci.xml configuration. This allows overrides of the global coverage rule on directory basis.

If a file specific coverage is specified for a file in that directory, this specific coverage will override the directory coverage rule again.

Order of precendence:

  • file coverage
  • directory coverage
  • global coverage

First match wins.

Specifying 2 directories, the most specific directory rule will win.

<directory path="directory/" min="85"/>
<directory path="directory/subdirectory" min="70"/>

Coverage for file:
directory/file.php = 85%.
directory/subdirectory/file.php = 70%.

@frankdekker frankdekker requested a review from a team as a code owner June 25, 2022 11:54
@frankdekker frankdekker requested review from bram123 and removed request for a team June 25, 2022 11:54
@frankdekker frankdekker merged commit 40c1f08 into master Jul 1, 2022
@frankdekker frankdekker deleted the Allow-per-directory-coverage-override branch July 1, 2022 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants