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

Version Path
reek-4.8.2 tasks/configuration.rake
reek-4.8.1 tasks/configuration.rake
reek-4.8.0 tasks/configuration.rake
reek-4.7.3 tasks/configuration.rake
reek-4.7.2 tasks/configuration.rake
reek-4.7.1 tasks/configuration.rake
reek-4.7.0 tasks/configuration.rake
reek-4.6.2 tasks/configuration.rake
reek-4.6.1 tasks/configuration.rake
reek-4.6.0 tasks/configuration.rake
reek-4.5.6 tasks/configuration.rake
reek-4.5.5 tasks/configuration.rake
reek-4.5.4 tasks/configuration.rake
reek-4.5.3 tasks/configuration.rake