diff --git a/README.md b/README.md index f368997f5f..bc994d7cf6 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,8 @@ your config/application.rb to apply RuboCop autocorrection to code generated by module YourCoolApp class Application < Rails::Application config.generators.after_generate do |files| - system("bundle exec rubocop -A --fail-level=E #{files.shelljoin}", exception: true) + parsable_files = files.filter { |file| file.end_with?('.rb') } + system("bundle exec rubocop -A --fail-level=E #{parsable_files.shelljoin}", exception: true) end end end diff --git a/docs/modules/ROOT/pages/usage.adoc b/docs/modules/ROOT/pages/usage.adoc index beda1a7ebc..c2bff0e9f4 100644 --- a/docs/modules/ROOT/pages/usage.adoc +++ b/docs/modules/ROOT/pages/usage.adoc @@ -41,7 +41,8 @@ your config/application.rb to apply RuboCop autocorretion to code generated by ` module YourCoolApp class Application < Rails::Application config.generators.after_generate do |files| - system("bundle exec rubocop -A --fail-level=E #{files.shelljoin}", exception: true) + parsable_files = files.filter { |file| file.end_with?('.rb') } + system("bundle exec rubocop -A --fail-level=E #{parsable_files.shelljoin}", exception: true) end end end