lib/warder/cli.rb in warder-0.1.1 vs lib/warder/cli.rb in warder-0.1.2
- old
+ new
@@ -1,19 +1,19 @@
module Warder
# responsible for executing warder tools
class CLI
def initialize(options)
- options[:files] = '.' if options[:files].empty?
@options = OpenStruct.new(options)
end
def perform
exit perform_style_guide_validation +
perform_magick_numbers_validation +
perform_code_duplication_validation +
perform_code_smells_validation +
- perform_code_complexity_validation
+ perform_code_complexity_validation +
+ perform_bundle_freshness_validation
end
private
def perform_style_guide_validation
@@ -53,9 +53,18 @@
end
def perform_code_complexity_validation
if @options.code_complexity
runner = CodeComplexityRunner.new(@options)
+ runner.perform
+ else
+ 0
+ end
+ end
+
+ def perform_bundle_freshness_validation
+ if @options.bundle_audit
+ runner = BundleAuditRunner.new(@options)
runner.perform
else
0
end
end