Skip to content

Commit

Permalink
Merge pull request #1263 from jherdman/protect-against-pretend-generates
Browse files Browse the repository at this point in the history
Protect against pretend generates
  • Loading branch information
koic committed Mar 29, 2024
2 parents b59d666 + 48cd5df commit f7d5a9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ your config/application.rb to apply RuboCop autocorrection to code generated by
module YourCoolApp
class Application < Rails::Application
config.generators.after_generate do |files|
parsable_files = files.filter { |file| file.end_with?('.rb') }
parsable_files = files.filter { |file| File.exist?(file) && file.end_with?('.rb') }
unless parsable_files.empty?
system("bundle exec rubocop -A --fail-level=E #{parsable_files.shelljoin}", exception: true)
end
Expand Down

0 comments on commit f7d5a9f

Please sign in to comment.