lib/reek/cli/reek_command.rb in reek-3.10.1 vs lib/reek/cli/reek_command.rb in reek-3.10.2
- old
+ new
@@ -10,14 +10,18 @@
class ReekCommand < Command
def execute(app)
options.sources.each do |source|
reporter.add_examiner Examiner.new(source, smell_names, configuration: app.configuration)
end
- reporter.smells? ? app.report_smells : app.report_success
reporter.show
+ result_code
end
private
+
+ def result_code
+ reporter.smells? ? options.failure_exit_code : options.success_exit_code
+ end
def reporter
@reporter ||= options.reporter
end