Sha256: 1372d2adf0622b889a11341006607a6684a3300a4eea813bfb5d6b9f48415d23
Contents?: true
Size: 710 Bytes
Versions: 23
Compression:
Stored size: 710 Bytes
Contents
# frozen_string_literal: true require 'bundler/gem_tasks' require 'rake/testtask' Rake::TestTask.new(:test) do |t| t.libs << 'test' t.libs << 'lib' t.test_files = FileList['test/**/*_test.rb'] end task default: :test desc 'Generate a new cop with a template' task :new_cop, [:cop] do |_task, args| require 'rubocop' cop_name = args.fetch(:cop) do warn 'usage: bundle exec rake new_cop[Department/Name]' exit! end generator = RuboCop::Cop::Generator.new(cop_name) generator.write_source generator.write_spec generator.inject_require(root_file_path: 'lib/rubocop/cop/codeur_cops.rb') generator.inject_config(config_file_path: 'config/default.yml') puts generator.todo end
Version data entries
23 entries across 23 versions & 1 rubygems