We have a nightly job that collects code coverage from the
At morning someone is merging PR to master with
86%coverage (is means that some files will have low coverage, but generally it enough)
file1.tsx // 100% file2.tsx // 90% file3.tsx // 70% // total: 86%
- Then other developer create a new PR
commit2 # morning merge (the PR with 86% coverage) commit1 # nightly job used this commit to collect coverage commitC commitB commitA
if developer will use
commit1as base for branch no issue, coverage for new files fill be correct !
BUT if he/she will use
commit2then sonarqube fail and report:
file3.tsxis a new files with low coverage, even I developer don’t touch them
How fix this behavior ?