Skip to content

Commit

Permalink
#116 through float
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Oct 20, 2023
1 parent f855162 commit a9b0026
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions metrics/multimetric.sh
Expand Up @@ -33,9 +33,9 @@ temp="${TARGET}/temp/multimetric.json"
mkdir -p "$(dirname "${temp}")"
echo "${body}" > "${temp}"
cat <<EOT> "${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
2 changes: 1 addition & 1 deletion tests/metrics/test-multimetric.sh
Expand Up @@ -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"
Expand Down

0 comments on commit a9b0026

Please sign in to comment.