doches/rwordnet

View on GitHub
examples/dictionary.rb

Summary

Maintainability
A
0 mins
Test Coverage

Space missing after comma.
Open

  lemma.synsets.each_with_index do |synset,i|
Severity: Minor
Found in examples/dictionary.rb by rubocop

Checks for comma (,) not followed by some kind of space.

Example:

# bad
[1,2]
{ foo:bar,}

# good
[1, 2]
{ foo:bar, }

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  puts "Usage: ruby dictionary.rb word"
Severity: Minor
Found in examples/dictionary.rb by rubocop

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"

Surrounding space missing for operator +.
Open

    puts "\t#{i+1}) #{synset.gloss}"
Severity: Minor
Found in examples/dictionary.rb by rubocop

Checks that operators have space around them, except for ** which should not have surrounding space.

Example:

# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b

# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b

There are no issues that match your filters.

Category
Status