expr main <(tuff [enough, like]), (tuff)>
let message "Swap `tuff` for `tough` when it describes strength or difficulty followed by 'enough' or 'like'."
let description "The adjective `tough` pairs with words like `enough` or `like`, so correct the common typo `tuff` in those constructions."
let kind "Typo"
let becomes "tough"
let strategy "MatchCase"
# True positives
# These examples should be rewritten with 'tough'.
test "He was tuff enough to lift it." "He was tough enough to lift it."
test "That plan needs to be tuff enough to withstand critique." "That plan needs to be tough enough to withstand critique."
test "Tuff enough, he still tried." "Tough enough, he still tried."
test "I'm feeling tuff like a warrior today." "I'm feeling tough like a warrior today."
test "Her tuff enough answer silenced the crowd." "Her tough enough answer silenced the crowd."
test "The tuff like textures on the armor impressed me." "The tough like textures on the armor impressed me."
test "They need to be tuff enough to finish the run." "They need to be tough enough to finish the run."
test "Tuff like this builds character." "Tough like this builds character."
test "She acted tuff enough to merge the teams." "She acted tough enough to merge the teams."
test "Tuff like steel, the hinge kept swinging." "Tough like steel, the hinge kept swinging."
test "The argument must be tuff enough to sway them." "The argument must be tough enough to sway them."
test "Tuff enough socks keep the feet warm." "Tough enough socks keep the feet warm."
# True negatives
# The rule should not fire when `tuff` is part of a name or followed by other words.
test "Tuff City hosts the festival." "Tuff City hosts the festival."
test "He called the passage tuff and unforgiving." "He called the passage tuff and unforgiving."
test "She grabbed a tuff bar before the workout." "She grabbed a tuff bar before the workout."
allows "Stay tuff, friend."
allows "Tuff, the nickname, belonged to his grandfather."