diff --git a/lib/queen/cli.rb b/lib/queen/cli.rb index 5082c79..7959bab 100644 --- a/lib/queen/cli.rb +++ b/lib/queen/cli.rb @@ -5,6 +5,7 @@ require_relative 'rule' require_relative 'rules/word_spelling' +require_relative 'rules/profanity' require_relative 'reporter' require_relative 'version' @@ -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 diff --git a/lib/queen/rules/word_spelling.rb b/lib/queen/rules/word_spelling.rb index 97eb835..d1d30b3 100644 --- a/lib/queen/rules/word_spelling.rb +++ b/lib/queen/rules/word_spelling.rb @@ -6,6 +6,8 @@ module Queen module Rules + # Spell check words in a source. + # @api public class WordSpelling < Queen::Rule register 'word_spelling', WordSpelling