diff --git a/src/Unused/LikelihoodCalculator.hs b/src/Unused/LikelihoodCalculator.hs index 79c3c29..ff35983 100644 --- a/src/Unused/LikelihoodCalculator.hs +++ b/src/Unused/LikelihoodCalculator.hs @@ -16,7 +16,7 @@ calculateLikelihood r = | elixirSingleOkay r = (Low, "a class, module, or migration that often occurs in only one file") | singleNonTestUsage r && testsExist r = (High, "only the definition and corresponding tests exist") | doubleNonTestUsage r && testsExist r = (Medium, "only the definition and one other use, along with tests, exists") - | totalScore < 2 = (High, "used infrequently") + | totalScore < 2 = (High, "used once") | totalScore < 6 = (Medium, "used semi-frequently") | totalScore >= 6 = (Low, "used frequently") | otherwise = (Unknown, "could not determine likelihood") diff --git a/test/Unused/ParserSpec.hs b/test/Unused/ParserSpec.hs index e6237fa..f4ba32c 100644 --- a/test/Unused/ParserSpec.hs +++ b/test/Unused/ParserSpec.hs @@ -24,7 +24,7 @@ spec = parallel $ let r1Results = TermResults "method_name" r1Matches (Occurrences 1 10) (Occurrences 2 6) (Occurrences 3 16) (Removal Low "used frequently") let r2Matches = [ TermMatch "other" "app/path/other.rb" 1 ] - let r2Results = TermResults "other" r2Matches (Occurrences 0 0) (Occurrences 1 1) (Occurrences 1 1) (Removal High "used infrequently") + let r2Results = TermResults "other" r2Matches (Occurrences 0 0) (Occurrences 1 1) (Occurrences 1 1) (Removal High "used once") let (Right result) = parseLines input