Skip to content

Instantly share code, notes, and snippets.

@douglaslise
Created October 5, 2018 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save douglaslise/ef5b3114c03f9dfdc3afa3bf43011d72 to your computer and use it in GitHub Desktop.
Save douglaslise/ef5b3114c03f9dfdc3afa3bf43011d72 to your computer and use it in GitHub Desktop.
#!ruby
require "byebug"
require "yaml"
system("rubocop -R --auto-gen-config -ES")
system("git checkout .rubocop.yml")
todo = YAML.load_file(".rubocop_todo.yml")
todo.keys.each do |key|
puts "Fixing #{key}"
system("rubocop -a -R --only #{key} app config lib features spec")
system("git add app config lib features spec")
system("git commit -m \"chore: Correct source files with rubocop #{key} cop\"")
end
system("rubocop -R --auto-gen-config -ES")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment