diff --git a/src/lib/writer-html.cc b/src/lib/writer-html.cc index 29342386..f1ccf0a1 100644 --- a/src/lib/writer-html.cc +++ b/src/lib/writer-html.cc @@ -139,11 +139,6 @@ void writeParseWarnings(std::ostream &str, const TScanProps &props) { TScanProps::const_iterator itCount, itRatio; itCount = props.find("cov-compilation-unit-count"); itRatio = props.find("cov-compilation-unit-ratio"); - if (props.end() == itCount || props.end() == itRatio) { - // fallback to deprecated format produced by cov-mockbuild - itCount = props.find("compilation-unit-count"); - itRatio = props.find("compilation-unit-ratio"); - } if (props.end() == itCount || props.end() == itRatio) return; @@ -152,15 +147,10 @@ void writeParseWarnings(std::ostream &str, const TScanProps &props) { const int ratio = boost::lexical_cast(itRatio->second); if (ratio < parsingRatioThr) str << "

warning: " - "low parsing ratio: " << ratio << "%

\n"; + "low ratio of compilation units successfully parsed by Coverity: " << ratio << "%

\n"; itCount = props.find("diffbase-cov-compilation-unit-count"); itRatio = props.find("diffbase-cov-compilation-unit-ratio"); - if (props.end() == itCount || props.end() == itRatio) { - // fallback to deprecated format produced by cov-mockbuild - itCount = props.find("diffbase-compilation-unit-count"); - itRatio = props.find("diffbase-compilation-unit-ratio"); - } if (props.end() == itCount || props.end() == itRatio) return; @@ -168,12 +158,12 @@ void writeParseWarnings(std::ostream &str, const TScanProps &props) { const int baseRatio = boost::lexical_cast(itRatio->second); if (baseRatio < parsingRatioThr && baseRatio < ratio) str << "

warning: " - "low parsing ratio in diff base: " + "low ratio of compilation units successfully parsed by Coverity in diff base: " << baseRatio << "%

\n"; if (!count || 100 * baseCount / count < parsingOldToNewRatioThr) str << "

warning: " - "low count of parsed units in diff base: " + "low count of compilation units successfully parsed by Coverity in diff base: " << baseCount << "

\n"; } catch (boost::bad_lexical_cast &) { diff --git a/tests/cshtml/0001-smoke/old/scan-results.json b/tests/cshtml/0001-smoke/old/scan-results.json index 28fc1c0b..80731a75 100644 --- a/tests/cshtml/0001-smoke/old/scan-results.json +++ b/tests/cshtml/0001-smoke/old/scan-results.json @@ -5,7 +5,7 @@ "analyzer-version-cppcheck": "1.80", "analyzer-version-gcc": "4.8.5", "analyzer-version-shellcheck": "0.4.7", - "cov-compilation-unit-count": 149, + "cov-compilation-unit-count": 49, "cov-compilation-unit-ratio": 100, "cov-lines-processed": 127521, "cov-time-elapsed-analysis": "00:01:51", diff --git a/tests/cshtml/0001-smoke/scan-results.html b/tests/cshtml/0001-smoke/scan-results.html index 29033a2d..eba7cc70 100644 --- a/tests/cshtml/0001-smoke/scan-results.html +++ b/tests/cshtml/0001-smoke/scan-results.html @@ -21,6 +21,8 @@

curl-7.60.0-1.el8+7

[Show plain-text results] +

warning: low ratio of compilation units successfully parsed by Coverity: 80%

+

warning: low count of compilation units successfully parsed by Coverity in diff base: 49

List of Findings

 Error: SHELLCHECK_WARNING: [#def1]
@@ -1430,11 +1432,11 @@ 

Scan Properties

analyzer-version-cppcheck1.80 analyzer-version-gcc8.1.1 analyzer-version-shellcheck0.4.7 -cov-compilation-unit-count193 -cov-compilation-unit-ratio100 +cov-compilation-unit-count154 +cov-compilation-unit-ratio80 cov-lines-processed174359 cov-time-elapsed-analysis00:01:55 -diffbase-cov-compilation-unit-count149 +diffbase-cov-compilation-unit-count49 diffbase-cov-compilation-unit-ratio100 exit-code0 hostcov01.lab.eng.brq.redhat.com diff --git a/tests/cshtml/0001-smoke/scan-results.json b/tests/cshtml/0001-smoke/scan-results.json index 5cd7cc0b..55c63d06 100644 --- a/tests/cshtml/0001-smoke/scan-results.json +++ b/tests/cshtml/0001-smoke/scan-results.json @@ -5,8 +5,8 @@ "analyzer-version-cppcheck": "1.80", "analyzer-version-gcc": "8.1.1", "analyzer-version-shellcheck": "0.4.7", - "cov-compilation-unit-count": 193, - "cov-compilation-unit-ratio": 100, + "cov-compilation-unit-count": 154, + "cov-compilation-unit-ratio": 80, "cov-lines-processed": 174359, "cov-time-elapsed-analysis": "00:01:55", "exit-code": 0,