Sha256: f83243b5212a6770c901b6a2fc3d8de6f1195cecfd53dce34f5a535981803462
Contents?: true
Size: 585 Bytes
Versions: 21
Compression:
Stored size: 585 Bytes
Contents
require_relative '../lib/reek/smells/smell_repository' require 'yaml' namespace :configuration do desc 'Updates the default configuration file when smell defaults change' task :update_default_configuration do DEFAULT_SMELL_CONFIGURATION = 'defaults.reek'.freeze content = Reek::Smells::SmellRepository.smell_types.each_with_object({}) do |klass, hash| hash[klass.smell_type] = klass.default_config end File.open(DEFAULT_SMELL_CONFIGURATION, 'w') { |file| YAML.dump(content, file) } end end task 'test:spec' => 'configuration:update_default_configuration'
Version data entries
21 entries across 21 versions & 1 rubygems