summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-08-09 21:03:27 +0900
committeraycabta <aycabta@gmail.com>2021-08-10 02:36:00 +0900
commitd082510429c9b9f39656e5faf811f06677de1dd3 (patch)
tree2d109b6fecf7fdb9b241a98805d78defa3db129c
parentb277a6d26d3667cdfb0b75594c9d378e3a2c5068 (diff)
[ruby/rdoc] Add "rake clean" task to erase generated parser files
https://github.com/ruby/rdoc/commit/4e3e635afa
-rw-r--r--lib/rdoc/Rakefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rdoc/Rakefile b/lib/rdoc/Rakefile
index fb00a270bc..278972e3ed 100644
--- a/lib/rdoc/Rakefile
+++ b/lib/rdoc/Rakefile
@@ -90,6 +90,12 @@ task "#{path}.gem" => package_parser_files
desc "Generate all files used racc and kpeg"
task :generate => parsed_files
+task :clean do
+ parsed_files.each do |path|
+ File.delete(path) if File.exist?(path)
+ end
+end
+
begin
require 'rubocop/rake_task'
rescue LoadError