lib/rwordnet/pointer.rb
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
source == "00" && target == "00"
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
source == "00" && target == "00"
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Line is too long. [81/80] Open
Open
# Pointers represent the relations between the words in one synset and another.
- Exclude checks
Line is too long. [101/80] Open
Open
# Create a pointer. Pointers represent the relations between the words in one synset and another,
- Exclude checks
Space missing after comma. Open
Open
@target = source.slice!(2,2)
- Read upRead up
- Exclude checks
Checks for comma (,) not followed by some kind of space.
Example:
# bad
[1,2]
{ foo:bar,}
# good
[1, 2]
{ foo:bar, }
Line is too long. [84/80] Open
Open
# and are referenced by a shorthand symbol (e.g. '!' for verb antonym). The list
- Exclude checks
Line is too long. [104/80] Open
Open
# The symbol that devices the relationship this pointer represents, e.g. "!" for verb antonym. Valid
- Exclude checks
Do not use parallel assignment. Open
Open
@symbol, @offset, @pos, @source = symbol, offset, pos, source
- Read upRead up
- Exclude checks
Checks for simple usages of parallel assignment. This will only complain when the number of variables being assigned matched the number of assigning variables.
Example:
# bad
a, b, c = 1, 2, 3
a, b, c = [1, 2, 3]
# good
one, two = *foo
a, b = foo()
a, b = b, a
a = 1
b = 2
c = 3
Line is too long. [100/80] Open
Open
# The part of speech this pointer represents. One of 'n', 'v', 'a' (adjective), or 'r' (adverb).
- Exclude checks
Rename is_semantic?
to semantic?
. Open
Open
def is_semantic?
- Read upRead up
- Exclude checks
This cop makes sure that predicates are named properly.
Example:
# bad
def is_even?(value)
end
# good
def even?(value)
end
# bad
def has_value?
end
# good
def value?
end