Sha256: 6384de2c63b126fdd17091ad27c361aba620f7ca249258298d95623ce23c7453

Contents?: true

Size: 578 Bytes

Versions: 12

Compression:

Stored size: 578 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'
    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

12 entries across 12 versions & 1 rubygems

Version Path
reek-3.10.1 tasks/configuration.rake
reek-3.10.0 tasks/configuration.rake
reek-3.9.1 tasks/configuration.rake
reek-3.9.0 tasks/configuration.rake
reek-3.8.3 tasks/configuration.rake
reek-3.8.2 tasks/configuration.rake
reek-3.8.1 tasks/configuration.rake
reek-3.8.0 tasks/configuration.rake
reek-3.7.1 tasks/configuration.rake
reek-3.7.0 tasks/configuration.rake
reek-3.6.1 tasks/configuration.rake
reek-3.6.0 tasks/configuration.rake