Skip to content

Commit

Permalink
Fix empty lines printing
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmurach committed Jan 20, 2018
1 parent dd30a8e commit 9bd38b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/queen/cli.rb
Expand Up @@ -5,6 +5,7 @@

require_relative 'rule'
require_relative 'rules/word_spelling'
require_relative 'rules/profanity'

require_relative 'reporter'
require_relative 'version'
Expand Down Expand Up @@ -60,7 +61,9 @@ def run(*args)
rule = rule_class.new
rule.check(source)
total_reprimands += rule.reprimands.count
puts reporter.report(file, rule)
if rule.reprimands.count.nonzero?
puts reporter.report(file, rule)
end
end
end

Expand Down
2 changes: 2 additions & 0 deletions lib/queen/rules/word_spelling.rb
Expand Up @@ -6,6 +6,8 @@

module Queen
module Rules
# Spell check words in a source.
# @api public
class WordSpelling < Queen::Rule

register 'word_spelling', WordSpelling
Expand Down

0 comments on commit 9bd38b9

Please sign in to comment.