Skip to content

Commit

Permalink
rules: update ComplexWords
Browse files Browse the repository at this point in the history
Related to #37.
  • Loading branch information
jdkato committed Apr 1, 2017
1 parent 22e1123 commit c77c99b
Show file tree
Hide file tree
Showing 4 changed files with 185 additions and 137 deletions.
148 changes: 82 additions & 66 deletions features/rules.feature
Original file line number Diff line number Diff line change
Expand Up @@ -46,72 +46,88 @@ Feature: Rules
When I test rule "ComplexWords"
Then the output should contain exactly:
"""
test.txt:1:1:vale.ComplexWords:Consider using 'plenty' instead of 'abundance'
test.txt:2:1:vale.ComplexWords:Consider using 'speed up' instead of 'accelerate'
test.txt:3:1:vale.ComplexWords:Consider using 'stress' instead of 'accentuate'
test.txt:4:1:vale.ComplexWords:Consider using 'go with' instead of 'accompany'
test.txt:5:1:vale.ComplexWords:Consider using 'do' instead of 'accomplish'
test.txt:6:1:vale.ComplexWords:Consider using 'given' instead of 'accorded'
test.txt:7:1:vale.ComplexWords:Consider using 'add' instead of 'accrue'
test.txt:8:1:vale.ComplexWords:Consider using 'agree' instead of 'acquiesce'
test.txt:9:1:vale.ComplexWords:Consider using 'get' instead of 'acquire'
test.txt:10:1:vale.ComplexWords:Consider using 'more' instead of 'additional'
test.txt:11:1:vale.ComplexWords:Consider using 'change' instead of 'adjustment'
test.txt:12:1:vale.ComplexWords:Consider using 'allowed' instead of 'admissible'
test.txt:13:1:vale.ComplexWords:Consider using 'helpful' instead of 'advantageous'
test.txt:14:1:vale.ComplexWords:Consider using 'tell' instead of 'advise'
test.txt:15:1:vale.ComplexWords:Consider using 'total' instead of 'aggregate'
test.txt:16:1:vale.ComplexWords:Consider using 'plane' instead of 'aircraft'
test.txt:17:1:vale.ComplexWords:Consider using 'ease' instead of 'alleviate'
test.txt:18:1:vale.ComplexWords:Consider using 'assign' instead of 'allocate'
test.txt:19:1:vale.ComplexWords:Consider using 'or' instead of 'alternatively'
test.txt:20:1:vale.ComplexWords:Consider using 'improve' instead of 'ameliorate'
test.txt:21:1:vale.ComplexWords:Consider using 'expect' instead of 'anticipate'
test.txt:22:1:vale.ComplexWords:Consider using 'clear' instead of 'apparent'
test.txt:23:1:vale.ComplexWords:Consider using 'many' instead of 'appreciable'
test.txt:24:1:vale.ComplexWords:Consider using 'discover' instead of 'ascertain'
test.txt:25:1:vale.ComplexWords:Consider using 'help' instead of 'assistance'
test.txt:26:1:vale.ComplexWords:Consider using 'meet' instead of 'attain'
test.txt:27:1:vale.ComplexWords:Consider using 'allow' instead of 'authorize'
test.txt:28:1:vale.ComplexWords:Consider using 'late' instead of 'belated'
test.txt:29:1:vale.ComplexWords:Consider using 'give' instead of 'bestow'
test.txt:30:1:vale.ComplexWords:Consider using 'stop' instead of 'cease'
test.txt:31:1:vale.ComplexWords:Consider using 'begin' instead of 'commence'
test.txt:32:1:vale.ComplexWords:Consider using 'about' instead of 'concerning'
test.txt:33:1:vale.ComplexWords:Consider using 'so' instead of 'consequently'
test.txt:34:1:vale.ComplexWords:Consider using 'merge' instead of 'consolidate'
test.txt:35:1:vale.ComplexWords:Consider using 'forms' instead of 'constitutes'
test.txt:36:1:vale.ComplexWords:Consider using 'show' instead of 'demonstrate'
test.txt:37:1:vale.ComplexWords:Consider using 'leave' instead of 'depart'
test.txt:38:1:vale.ComplexWords:Consider using 'choose' instead of 'designate'
test.txt:39:1:vale.ComplexWords:Consider using 'stop' instead of 'discontinue'
test.txt:40:1:vale.ComplexWords:Consider using 'end' instead of 'eliminate'
test.txt:41:1:vale.ComplexWords:Consider using 'explain' instead of 'elucidate'
test.txt:42:1:vale.ComplexWords:Consider using 'use' instead of 'employ'
test.txt:43:1:vale.ComplexWords:Consider using 'try' instead of 'endeavor'
test.txt:44:1:vale.ComplexWords:Consider using 'count' instead of 'enumerate'
test.txt:45:1:vale.ComplexWords:Consider using 'fair' instead of 'equitable'
test.txt:46:1:vale.ComplexWords:Consider using 'equal' instead of 'equivalent'
test.txt:47:1:vale.ComplexWords:Consider using 'only' instead of 'exclusively'
test.txt:48:1:vale.ComplexWords:Consider using 'hurry' instead of 'expedite'
test.txt:49:1:vale.ComplexWords:Consider using 'ease' instead of 'facilitate'
test.txt:50:1:vale.ComplexWords:Consider using 'method' instead of 'methodology'
test.txt:51:1:vale.ComplexWords:Consider using 'many' instead of 'multiple'
test.txt:52:1:vale.ComplexWords:Consider using 'cause' instead of 'necessitate'
test.txt:53:1:vale.ComplexWords:Consider using 'many' instead of 'numerous'
test.txt:54:1:vale.ComplexWords:Consider using 'best' instead of 'optimum'
test.txt:55:1:vale.ComplexWords:Consider using 'part' instead of 'portion'
test.txt:56:1:vale.ComplexWords:Consider using 'own' instead of 'possess'
test.txt:57:1:vale.ComplexWords:Consider using 'buy' instead of 'procure'
test.txt:58:1:vale.ComplexWords:Consider using 'buy' instead of 'purchase'
test.txt:59:1:vale.ComplexWords:Consider using 'move' instead of 'relocate'
test.txt:60:1:vale.ComplexWords:Consider using 'request' instead of 'solicit'
test.txt:61:1:vale.ComplexWords:Consider using 'latest' instead of 'state-of-the-art'
test.txt:62:1:vale.ComplexWords:Consider using 'large' instead of 'substantial'
test.txt:63:1:vale.ComplexWords:Consider using 'end' instead of 'terminate'
test.txt:64:1:vale.ComplexWords:Consider using 'send' instead of 'transmit'
test.txt:65:1:vale.ComplexWords:Consider using 'use' instead of 'utilization'
test.txt:66:1:vale.ComplexWords:Consider using 'use' instead of 'utilize'
test.txt:1:1:vale.ComplexWords:Consider using 'none' or 'not here' instead of 'absent'
test.txt:2:1:vale.ComplexWords:Consider using 'plenty' instead of 'abundance'
test.txt:3:1:vale.ComplexWords:Consider using 'speed up' instead of 'accelerate'
test.txt:4:1:vale.ComplexWords:Consider using 'stress' instead of 'accentuate'
test.txt:5:1:vale.ComplexWords:Consider using 'go with' instead of 'accompany'
test.txt:6:1:vale.ComplexWords:Consider using 'do' instead of 'accomplish'
test.txt:7:1:vale.ComplexWords:Consider using 'given' instead of 'accorded'
test.txt:8:1:vale.ComplexWords:Consider using 'add' instead of 'accrue'
test.txt:9:1:vale.ComplexWords:Consider using 'agree' instead of 'acquiesce'
test.txt:10:1:vale.ComplexWords:Consider using 'get' or 'buy' instead of 'acquire'
test.txt:11:1:vale.ComplexWords:Consider using 'more' or 'extra' instead of 'additional'
test.txt:12:1:vale.ComplexWords:Consider using 'change' instead of 'adjustment'
test.txt:13:1:vale.ComplexWords:Consider using 'allowed' instead of 'admissible'
test.txt:14:1:vale.ComplexWords:Consider using 'helpful' instead of 'advantageous'
test.txt:15:1:vale.ComplexWords:Consider using 'tell' instead of 'advise'
test.txt:16:1:vale.ComplexWords:Consider using 'total' instead of 'aggregate'
test.txt:17:1:vale.ComplexWords:Consider using 'plane' instead of 'aircraft'
test.txt:18:1:vale.ComplexWords:Consider using 'ease' instead of 'alleviate'
test.txt:19:1:vale.ComplexWords:Consider using 'assign' or 'divide' instead of 'allocate'
test.txt:20:1:vale.ComplexWords:Consider using 'or' instead of 'alternatively'
test.txt:21:1:vale.ComplexWords:Consider using 'choices' or 'options' instead of 'alternatives'
test.txt:22:1:vale.ComplexWords:Consider using 'improve' instead of 'ameliorate'
test.txt:23:1:vale.ComplexWords:Consider using 'change' instead of 'amend'
test.txt:24:1:vale.ComplexWords:Consider using 'expect' instead of 'anticipate'
test.txt:25:1:vale.ComplexWords:Consider using 'clear' instead of 'apparent'
test.txt:26:1:vale.ComplexWords:Consider using 'many' instead of 'appreciable'
test.txt:27:1:vale.ComplexWords:Consider using 'about' instead of 'approximately'
test.txt:28:1:vale.ComplexWords:Consider using 'discover' instead of 'ascertain'
test.txt:29:1:vale.ComplexWords:Consider using 'help' instead of 'assistance'
test.txt:30:1:vale.ComplexWords:Consider using 'meet' instead of 'attain'
test.txt:31:1:vale.ComplexWords:Consider using 'try' instead of 'attempt'
test.txt:32:1:vale.ComplexWords:Consider using 'allow' instead of 'authorize'
test.txt:33:1:vale.ComplexWords:Consider using 'late' instead of 'belated'
test.txt:34:1:vale.ComplexWords:Consider using 'give' instead of 'bestow'
test.txt:35:1:vale.ComplexWords:Consider using 'stop' or 'end' instead of 'cease'
test.txt:36:1:vale.ComplexWords:Consider using 'work together' instead of 'collaborate'
test.txt:37:1:vale.ComplexWords:Consider using 'begin' instead of 'commence'
test.txt:38:1:vale.ComplexWords:Consider using 'pay' instead of 'compensate'
test.txt:39:1:vale.ComplexWords:Consider using 'part' instead of 'component'
test.txt:40:1:vale.ComplexWords:Consider using 'idea' instead of 'concept'
test.txt:41:1:vale.ComplexWords:Consider using 'about' instead of 'concerning'
test.txt:42:1:vale.ComplexWords:Consider using 'give' or 'award' instead of 'confer'
test.txt:43:1:vale.ComplexWords:Consider using 'so' instead of 'consequently'
test.txt:44:1:vale.ComplexWords:Consider using 'merge' instead of 'consolidate'
test.txt:45:1:vale.ComplexWords:Consider using 'forms' instead of 'constitutes'
test.txt:46:1:vale.ComplexWords:Consider using 'show' or 'prove' instead of 'demonstrate'
test.txt:47:1:vale.ComplexWords:Consider using 'leave' instead of 'depart'
test.txt:48:1:vale.ComplexWords:Consider using 'choose' instead of 'designate'
test.txt:49:1:vale.ComplexWords:Consider using 'bad' or 'harmful' instead of 'detrimental'
test.txt:50:1:vale.ComplexWords:Consider using 'share' or 'tell' instead of 'disclose'
test.txt:51:1:vale.ComplexWords:Consider using 'stop' instead of 'discontinue'
test.txt:52:1:vale.ComplexWords:Consider using 'end' instead of 'eliminate'
test.txt:53:1:vale.ComplexWords:Consider using 'explain' instead of 'elucidate'
test.txt:54:1:vale.ComplexWords:Consider using 'use' instead of 'employ'
test.txt:55:1:vale.ComplexWords:Consider using inside or 'included' instead of 'enclosed'
test.txt:56:1:vale.ComplexWords:Consider using 'try' instead of 'endeavor'
test.txt:57:1:vale.ComplexWords:Consider using 'count' instead of 'enumerate'
test.txt:58:1:vale.ComplexWords:Consider using 'fair' instead of 'equitable'
test.txt:59:1:vale.ComplexWords:Consider using 'equal' instead of 'equivalent'
test.txt:60:1:vale.ComplexWords:Consider using 'only' instead of 'exclusively'
test.txt:61:1:vale.ComplexWords:Consider using 'hurry' instead of 'expedite'
test.txt:62:1:vale.ComplexWords:Consider using 'ease' instead of 'facilitate'
test.txt:63:1:vale.ComplexWords:Consider using 'wrong' instead of 'incorrect'
test.txt:64:1:vale.ComplexWords:Consider using 'listed' instead of 'itemized'
test.txt:65:1:vale.ComplexWords:Consider using 'risk' instead of 'jeopardize'
test.txt:66:1:vale.ComplexWords:Consider using 'method' instead of 'methodology'
test.txt:67:1:vale.ComplexWords:Consider using 'many' instead of 'multiple'
test.txt:68:1:vale.ComplexWords:Consider using 'cause' instead of 'necessitate'
test.txt:69:1:vale.ComplexWords:Consider using 'many' instead of 'numerous'
test.txt:70:1:vale.ComplexWords:Consider using 'best' instead of 'optimum'
test.txt:71:1:vale.ComplexWords:Consider using 'part' instead of 'portion'
test.txt:72:1:vale.ComplexWords:Consider using 'own' instead of 'possess'
test.txt:73:1:vale.ComplexWords:Consider using 'buy' instead of 'procure'
test.txt:74:1:vale.ComplexWords:Consider using 'buy' instead of 'purchase'
test.txt:75:1:vale.ComplexWords:Consider using 'move' instead of 'relocate'
test.txt:76:1:vale.ComplexWords:Consider using 'request' instead of 'solicit'
test.txt:77:1:vale.ComplexWords:Consider using 'latest' instead of 'state-of-the-art'
test.txt:78:1:vale.ComplexWords:Consider using 'large' instead of 'substantial'
test.txt:79:1:vale.ComplexWords:Consider using 'end' instead of 'terminate'
test.txt:80:1:vale.ComplexWords:Consider using 'send' instead of 'transmit'
test.txt:81:1:vale.ComplexWords:Consider using 'use' instead of 'utilization'
test.txt:82:1:vale.ComplexWords:Consider using 'use' instead of 'utilize'
"""

Scenario: Editorializing (rule)
Expand Down
16 changes: 16 additions & 0 deletions fixtures/rules/ComplexWords/test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
absent
abundance
accelerate
accentuate
Expand All @@ -17,36 +18,51 @@ aircraft
alleviate
allocate
alternatively
alternatives
ameliorate
amend
anticipate
apparent
appreciable
approximately
ascertain
assistance
attain
attempt
authorize
belated
bestow
cease
collaborate
commence
compensate
component
concept
concerning
confer
consequently
consolidate
constitutes
demonstrate
depart
designate
detrimental
disclose
discontinue
eliminate
elucidate
employ
enclosed
endeavor
enumerate
equitable
equivalent
exclusively
expedite
facilitate
incorrect
itemized
jeopardize
methodology
multiple
necessitate
Expand Down
150 changes: 83 additions & 67 deletions rule/ComplexWords.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,87 @@
extends: substitution
message: Consider using '%s' instead of '%s'
message: Consider using %s instead of '%s'
ignorecase: true
level: warning
swap:
abundance: plenty
accelerate: speed up
accentuate: stress
accompany: go with
accomplish: do
accorded: given
accrue: add
acquiesce: agree
acquire: get
additional: more
adjustment: change
admissible: allowed
advantageous: helpful
advise: tell
aggregate: total
aircraft: plane
alleviate: ease
allocate: assign
alternatively: or
ameliorate: improve
anticipate: expect
apparent: clear
appreciable: many
ascertain: discover
assistance: help
attain: meet
authorize: allow
belated: late
bestow: give
cease: stop
commence: begin
concerning: about
consequently: so
consolidate: merge
constitutes: forms
demonstrate: show
depart: leave
designate: choose
discontinue: stop
eliminate: end
elucidate: explain
employ: use
endeavor: try
enumerate: count
equitable: fair
equivalent: equal
exclusively: only
expedite: hurry
facilitate: ease
methodology: method
multiple: many
necessitate: cause
numerous: many
optimum: best
portion: part
possess: own
procure: buy
purchase: buy
relocate: move
solicit: request
state-of-the-art: latest
substantial: large
terminate: end
transmit: send
utilization: use
utilize: use
absent: "'none' or 'not here'"
abundance: "'plenty'"
accelerate: "'speed up'"
accentuate: "'stress'"
accompany: "'go with'"
accomplish: "'do'"
accorded: "'given'"
accrue: "'add'"
acquiesce: "'agree'"
acquire: "'get' or 'buy'"
additional: "'more' or 'extra'"
adjustment: "'change'"
admissible: "'allowed'"
advantageous: "'helpful'"
advise: "'tell'"
aggregate: "'total'"
aircraft: "'plane'"
alleviate: "'ease'"
allocate: "'assign' or 'divide'"
alternatively: "'or'"
alternatives: "'choices' or 'options'"
ameliorate: "'improve'"
amend: "'change'"
anticipate: "'expect'"
apparent: "'clear'"
appreciable: "'many'"
approximately: "'about'"
ascertain: "'discover'"
assistance: "'help'"
attain: "'meet'"
attempt: "'try'"
authorize: "'allow'"
belated: "'late'"
bestow: "'give'"
cease: "'stop' or 'end'"
collaborate: "'work together'"
commence: "'begin'"
compensate: "'pay'"
component: "'part'"
concept: "'idea'"
concerning: "'about'"
confer: "'give' or 'award'"
consequently: "'so'"
consolidate: "'merge'"
constitutes: "'forms'"
demonstrate: "'show' or 'prove'"
depart: "'leave'"
designate: "'choose'"
detrimental: "'bad' or 'harmful'"
disclose: "'share' or 'tell'"
discontinue: "'stop'"
eliminate: "'end'"
elucidate: "'explain'"
employ: "'use'"
enclosed: "inside or 'included'"
endeavor: "'try'"
enumerate: "'count'"
equitable: "'fair'"
equivalent: "'equal'"
exclusively: "'only'"
expedite: "'hurry'"
facilitate: "'ease'"
incorrect: "'wrong'"
itemized: "'listed'"
jeopardize: "'risk'"
methodology: "'method'"
multiple: "'many'"
necessitate: "'cause'"
numerous: "'many'"
optimum: "'best'"
portion: "'part'"
possess: "'own'"
procure: "'buy'"
purchase: "'buy'"
relocate: "'move'"
solicit: "'request'"
state-of-the-art: "'latest'"
substantial: "'large'"
terminate: "'end'"
transmit: "'send'"
utilization: "'use'"
utilize: "'use'"
Loading

0 comments on commit c77c99b

Please sign in to comment.