Sha256: 218a40fce715c57d7c0dc1561d15315dacec58f9da9853881ae85d7bd5a54af3

Contents?: true

Size: 766 Bytes

Versions: 15

Compression:

Stored size: 766 Bytes

Contents

require_relative '../lib/reek'
require_relative '../lib/reek/detector_repository'
require_relative '../lib/reek/configuration/rake_task_converter'
require_relative '../lib/reek/configuration/app_configuration'

require 'yaml'

namespace :configuration do
  desc 'Updates the default configuration file when smell defaults change'
  task :update_default_configuration do
    DEFAULT_SMELL_CONFIGURATION = 'docs/defaults.reek.yml'.freeze
    content = Reek::DetectorRepository.smell_types.each_with_object({}) do |klass, hash|
      hash[klass.smell_type] = Reek::Configuration::RakeTaskConverter.convert klass.default_config
    end
    File.open(DEFAULT_SMELL_CONFIGURATION, 'w') do |file|
      YAML.dump({ Reek::DETECTORS_KEY => content }, file)
    end
  end
end

Version data entries

15 entries across 13 versions & 2 rubygems

Version Path
reek-6.0.1 tasks/configuration.rake
reek-6.0.0 tasks/configuration.rake
reek-5.6.0 tasks/configuration.rake
reek-5.5.0 tasks/configuration.rake
reek-5.4.1 tasks/configuration.rake
reek-5.4.0 tasks/configuration.rake
reek-5.3.2 tasks/configuration.rake
reek-5.3.1 tasks/configuration.rake
reek-5.3.0 tasks/configuration.rake
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/tasks/configuration.rake
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/tasks/configuration.rake
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/tasks/configuration.rake
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/tasks/configuration.rake
reek-5.2.0 tasks/configuration.rake
reek-5.1.0 tasks/configuration.rake