From a9b0026ae91788ed357e55b4538dc6cc5d54805e Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Fri, 20 Oct 2023 11:53:46 +0300 Subject: [PATCH] #116 through float --- metrics/multimetric.sh | 10 +++++----- tests/metrics/test-multimetric.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/metrics/multimetric.sh b/metrics/multimetric.sh index 40a95559..e177f4d4 100755 --- a/metrics/multimetric.sh +++ b/metrics/multimetric.sh @@ -33,9 +33,9 @@ temp="${TARGET}/temp/multimetric.json" mkdir -p "$(dirname "${temp}")" echo "${body}" > "${temp}" cat < "${output}" -hsdif $(echo "${body}" | jq '.halstead_difficulty') Halstead Difficulty -hsef $(echo "${body}" | jq '.halstead_effort') Halstead Effort -hsvol $(echo "${body}" | jq '.halstead_volume') Halstead Volume -midx $(echo "${body}" | jq '.maintainability_index') Maintainability Index -fout $(echo "${body}" | jq '.fanout_external') Fan-Out +hsdif $(echo "${body}" | jq '.halstead_difficulty' | "${LOCAL}/help/float.sh") Halstead Difficulty +hsef $(echo "${body}" | jq '.halstead_effort' | "${LOCAL}/help/float.sh") Halstead Effort +hsvol $(echo "${body}" | jq '.halstead_volume' | "${LOCAL}/help/float.sh") Halstead Volume +midx $(echo "${body}" | jq '.maintainability_index' | "${LOCAL}/help/float.sh") Maintainability Index +fout $(echo "${body}" | jq '.fanout_external' | "${LOCAL}/help/float.sh") Fan-Out EOT diff --git a/tests/metrics/test-multimetric.sh b/tests/metrics/test-multimetric.sh index 44982d5c..7fea94ae 100755 --- a/tests/metrics/test-multimetric.sh +++ b/tests/metrics/test-multimetric.sh @@ -49,7 +49,7 @@ EOT "${LOCAL}/metrics/multimetric.sh" "${java}" "${temp}/stdout" cat "${TARGET}/temp/multimetric.json" cat "${temp}/stdout" - grep "hsdif 6.0" "${temp}/stdout" + grep "hsdif 6" "${temp}/stdout" grep "hsef 1133.218" "${temp}/stdout" grep "hsvol 188.87" "${temp}/stdout" grep "midx 100" "${temp}/stdout"