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

Version Path
reek-4.4.2 tasks/configuration.rake
reek-4.4.1 tasks/configuration.rake
reek-4.4.0 tasks/configuration.rake
reek-4.3.0 tasks/configuration.rake
reek-4.2.5 tasks/configuration.rake
reek-4.2.4 tasks/configuration.rake
reek-4.2.3 tasks/configuration.rake
reek-4.2.2 tasks/configuration.rake
reek-4.2.1 tasks/configuration.rake
reek-4.2.0 tasks/configuration.rake
reek-4.1.1 tasks/configuration.rake
reek-4.1.0 tasks/configuration.rake
reek-4.0.5 tasks/configuration.rake
reek-4.0.4 tasks/configuration.rake
reek-4.0.3 tasks/configuration.rake
reek-4.0.2 tasks/configuration.rake
reek-4.0.1 tasks/configuration.rake
reek-4.0.0 tasks/configuration.rake
reek-4.0.0.pre1 tasks/configuration.rake
reek-3.11 tasks/configuration.rake