Class: Bankai::Generators::LintGenerator
- Defined in:
- lib/bankai/generators/lint_generator.rb
Overview
:nodoc:
Instance Method Summary collapse
- #configure_overcommit ⇒ Object
- #configure_rubocop ⇒ Object
- #install_overcommit ⇒ Object
- #rubocop_autocorrect ⇒ Object
- #rubocop_todo ⇒ Object
Methods inherited from Base
Instance Method Details
#configure_overcommit ⇒ Object
9 10 11 |
# File 'lib/bankai/generators/lint_generator.rb', line 9 def configure_overcommit template 'overcommit.yml.erb', '.overcommit.yml' end |
#configure_rubocop ⇒ Object
13 14 15 16 17 |
# File 'lib/bankai/generators/lint_generator.rb', line 13 def configure_rubocop return if Rails::VERSION::MAJOR >= 8 template 'rubocop.yml.erb', '.rubocop.yml' end |
#install_overcommit ⇒ Object
19 20 21 |
# File 'lib/bankai/generators/lint_generator.rb', line 19 def install_overcommit run 'bundle exec overcommit --install' end |
#rubocop_autocorrect ⇒ Object
23 24 25 26 27 |
# File 'lib/bankai/generators/lint_generator.rb', line 23 def rubocop_autocorrect return if Rails::VERSION::MAJOR >= 8 run 'bundle exec rubocop --auto-correct-all' end |
#rubocop_todo ⇒ Object
29 30 31 32 33 |
# File 'lib/bankai/generators/lint_generator.rb', line 29 def rubocop_todo return if Rails::VERSION::MAJOR >= 8 run 'bundle exec rubocop --auto-gen-config' end |