Sha256: ea916b66d12c20c433dd7edea757592d003015b827e0835eb703063d66dbfad7
Contents?: true
Size: 576 Bytes
Versions: 14
Compression:
Stored size: 576 Bytes
Contents
require_relative '../lib/reek/detector_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::DetectorRepository.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
14 entries across 14 versions & 1 rubygems