Skip to content

Commit

Permalink
Fix rubocop offenses
Browse files Browse the repository at this point in the history
```
❯ bundle exec rubocop -A
Inspecting 276 files
...................................................................................................................................................................................................................................................................................W

Offenses:

tasks/cut_release.rake:41:21: W: [Corrected] Lint/ImplicitStringConcatenation: Combine '\0' and "## #{version} (#{Time.now.strftime('%F')})\n\n" into a single string literal, rather than using implicit string concatenation. Or, if they were intended to be separate method arguments, separate them with a comma.
                    '\0' "## #{version} (#{Time.now.strftime('%F')})\n\n")
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tasks/cut_release.rake:41:21: C: [Corrected] Style/StringConcatenation: Prefer string interpolation to string concatenation.
                    '\0' + "## #{version} (#{Time.now.strftime('%F')})\n\n")
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

276 files inspected, 2 offenses detected, 2 offenses corrected
```
  • Loading branch information
ydah committed Jul 19, 2024
1 parent fe3b66b commit 6f06a33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/cut_release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace :cut_release do
def add_header_to_changelog(version)
update_file('CHANGELOG.md') do |changelog|
changelog.sub("## Master (Unreleased)\n\n",
'\0' "## #{version} (#{Time.now.strftime('%F')})\n\n")
"\\0## #{version} (#{Time.now.strftime('%F')})\n\n")
end
end

Expand Down

0 comments on commit 6f06a33

Please sign in to comment.