Sha256: 4f39ac126f58a20d96473996419ff58b3ac0bdbe9493f275b3c79fa3f26ebb54
Contents?: true
Size: 977 Bytes
Versions: 37
Compression:
Stored size: 977 Bytes
Contents
require "cc/analyzer" module CC module CLI module Engines class Remove < EngineCommand ARGUMENT_LIST = "<engine_name>".freeze SHORT_HELP = "Remove an engine from your codeclimate.yml.".freeze HELP = "#{SHORT_HELP} This command deletes the config rather than setting it to disabled.\n" \ "\n"\ " <engine_name> Engine to remove from your codeclimate.yml".freeze def run require_codeclimate_yml if !engine_exists? say "Engine not found. Run 'codeclimate engines:list' for a list of valid engines." elsif !engine_present_in_yaml? say "Engine not found in .codeclimate.yml." else remove_engine update_yaml say "Engine removed from .codeclimate.yml." end end private def remove_engine parsed_yaml.remove_engine(engine_name) end end end end end
Version data entries
37 entries across 37 versions & 1 rubygems