lib/goodcheck/commands/test.rb in goodcheck-2.5.2 vs lib/goodcheck/commands/test.rb in goodcheck-2.6.0

- old
+ new

@@ -1,10 +1,11 @@ module Goodcheck module Commands class Test include ConfigLoading include HomePath + include ExitStatus attr_reader :stdout attr_reader :stderr attr_reader :config_path attr_reader :home_path @@ -22,16 +23,16 @@ handle_config_errors stderr do load_config!(cache_path: cache_dir_path, force_download: force_download) if config.rules.empty? stdout.puts "No rules." - return 0 + return EXIT_SUCCESS end - validate_rule_uniqueness or return 1 - validate_rules or return 1 + validate_rule_uniqueness or return EXIT_ERROR + validate_rules or return EXIT_ERROR - 0 + EXIT_SUCCESS end end def validate_rule_uniqueness stdout.puts "Validating rule id uniqueness..."