Sha256: 3d81e328c1948685bea8fe2e3304f871aa308016f7f457ee03e69f0dd8d05c8c
Contents?: true
Size: 768 Bytes
Versions: 3
Compression:
Stored size: 768 Bytes
Contents
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::Configuration::AppConfiguration::DETECTORS_KEY => content }, file) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
reek-5.0.2 | tasks/configuration.rake |
reek-5.0.1 | tasks/configuration.rake |
reek-5.0.0 | tasks/configuration.rake |