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:
Target
is set to auto
.fully_covered_patch
removals_only
adjust_base
(default behavior)off
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
If the patch coverage is 100% and there are no unexpected changes, the project status should be: pass.
Indirect changes might be caused by modifications to both new and existing tests, covered and uncovered tests, processing errors, CI errors, and so on.
Patch coverage Indirect changes CI status Scenario 100% False Pass status If the patch coverage % either increases, decreases, or remains equal to 100% with no indirect changes, the project status will pass. 100% True Fail status If the patch coverage % remains at 100% with direct changes, the project status will fail. < 100% True Fail status If the patch coverage % either decreases or is less than 100% with indirect changes, the project status will fail. < 100% False Fail status If the patch coverage % either decreases or is less than 100% with no indirect changes, the project status will fail.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.
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%.
threshold
is default/not set or automatic
, the project status check will fail because project coverage has gone down from 90% to 87.5%, a reduction of 2.5%.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