We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c86b154 commit 8e42632Copy full SHA for 8e42632
rake_tasks/doc_generator.rake
@@ -82,8 +82,12 @@ namespace :docs do
82
File.open('temp.rb', 'w') do |f|
83
f.puts code
84
end
85
- # Format code:
86
- system("rubocop --config #{__dir__}/docs_rubocop_config.yml -o /dev/null -a ./temp.rb")
+ # Format code with Rubocop
+ require 'rubocop'
87
+ options = "--config #{__dir__}/docs_rubocop_config.yml -o /dev/null -a ./temp.rb".split
88
+ cli = RuboCop::CLI.new
89
+ cli.run(options)
90
+
91
# Read it back
92
template = File.read('./temp.rb')
93
File.delete('./temp.rb')
0 commit comments