@hey_cube
?
Rufo
group :development do
gem "rubocop-config-rufo", require: false
gem "rufo", require: false
end
inherit_gem:
rubocop-config-rufo: rubocop.yml
- run:
name: run rufo check
command: bundle exec rufo --check app config db/seeds.rb db/seeds lib spec Gemfile Rakefile
rake タスクにしちゃう
# frozen_string_literal: true
require "bundler/setup"
require "rufo"
namespace :rufo do
desc "Rufo に違反していないか確認する"
task :check do
Rufo::Command.run(["--check", "app", "config", "db/seeds.rb", "db/seeds", "lib", "spec", "Gemfile", "Rakefile"])
end
desc "Rufo に従って整形する"
task :format do
Rufo::Command.run(["app", "config", "db/seeds.rb", "db/seeds", "lib", "spec", "Gemfile", "Rakefile"])
end
end
- run:
name: run rufo check
command: bundle exec rake rufo:check
{
"recommendations": [
"rebornix.ruby",
"misogi.ruby-rubocop",
"mbessey.vscode-rufo"
],
"unwantedRecommendations": []
}
{
"ruby.lint": {
"rubocop": true
},
"[ruby]": {
"editor.defaultFormatter": "mbessey.vscode-rufo"
}
}