rubygems / rfcs

RubyGems + Bundler RFCs
45 stars 40 forks source link

[Bundler] Adding frozen string literal comment to generated files #30

Open diegous opened 3 years ago

diegous commented 3 years ago

Problem

When running bundle gem my_gem several files are created, none of which include # frozen_string_literal: true which is a default requirement of some linters like rubocop.

Solution

Include that line by default in generated ruby files (e.g. ), or add a flag to indicate the comment is desired in the new gem.

Some of the files that could include this line:

Note: This is a really small change, and might not even consider it an improvement so if there isn't too much support for this we can simply close it.