A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://docs.codecov.io/docs/removed-code-behavior below:

Removed Code Behavior

How removed code behavior works:

Removed code behavior (RCB) is designed to help maintain a passing CI status so that developers can streamline their codebase without worrying about losing code coverage. In the development practice, code removal can be a good thing, however, removing entire lines can reduce the coverage percentage (which is affected if the ratio of total lines to total covered lines changes).

A few more things to note:

Initial scenario:

Action taken:

Developer removes 3 covered lines and adds 1 covered line. All changes are in a pull request.

Project coverage calculation:

Initial calculation:

After removing 3 covered lines and adding 1 covered line:

Option 1: fully_covered_patch

When looking at the motivating example scenario, the project status check will always pass because the patch (the 1 line that was added) is 100% covered.

Lines removed Lines added Indirect changes CI status Scenario True False False Pass status -Lines removed
-No new lines added
-No indirect changes made True True True Fail status -Lines removed
-New lines added
-Indirect changes made True True False Fail status -Lines removed
-New lines added
-No indirect changes made True False True Fail status -Lines removed
-No new lines added
-Indirect changes made False True True Fail status -No lines removed
-New lines added
-Indirect changes made False False True Fail status -No lines removed
-No new lines added
-Indirect changes made False True False Fail status -No lines removed
-New lines added
-No indirect changes made False False False Fail status -No lines removed
-No new lines added
-No indirect changes made

When looking at the motivating example scenario, if status threshold is default/not set or automatic, the project status check will fail because 1 or more line has been added and coverage has decreased from 90% to 87.5%, a reduction of 2.5%.

When looking at the motivating example scenario, if status threshold is default/not set or automatic, the project status check will pass because the project coverage has increased from an  adjusted_base of 85.7% to 87.5% (7/8 covered lines), an increase of 1.8%.

Updated over 1 year ago


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4