Skip to content

Commit b080880

Browse files
committed
Turn on and fix rubocop Style/FrozenStringLiteralComment.
1 parent 22fe089 commit b080880

22 files changed

+48
-11
lines changed

.rubocop.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ Lint/UselessAccessModifier:
1717
Style/PreferredHashMethods:
1818
EnforcedStyle: verbose
1919

20-
# Turn this off for now.
21-
Style/FrozenStringLiteralComment:
22-
Enabled: false
23-
2420
# Enforce empty lines at the beginning of classes.
2521
Layout/EmptyLinesAroundClassBody:
2622
EnforcedStyle: beginning_only

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

35
gemspec

Rakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Copyright (c) 2018 Robert Haines.
24
#
35
# Licensed under the Apache License, Version 2.0 (the "License");

bin/console

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
23

34
require 'bundler/setup'
45
require 'cff'

cff.gemspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Copyright (c) 2018 Robert Haines.
24
#
35
# Licensed under the Apache License, Version 2.0 (the "License");

lib/cff.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Copyright (c) 2018 Robert Haines.
24
#
35
# Licensed under the Apache License, Version 2.0 (the "License");

lib/cff/entity.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Copyright (c) 2018 Robert Haines.
24
#
35
# Licensed under the Apache License, Version 2.0 (the "License");

lib/cff/file.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Copyright (c) 2018 Robert Haines.
24
#
35
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -32,7 +34,7 @@ class File
3234
# if not, use a single string.
3335
attr_accessor :comment
3436

35-
YAML_HEADER = "---\n".freeze # :nodoc:
37+
YAML_HEADER = "---\n" # :nodoc:
3638
CFF_COMMENT = [
3739
"This CITATION.cff file was created by ruby-cff (v #{CFF::VERSION}).",
3840
'Gem: https://rubygems.org/gems/cff',

lib/cff/model.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Copyright (c) 2018 Robert Haines.
24
#
35
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -51,7 +53,7 @@ class Model < ModelPart
5153

5254
# The default message to use if none is explicitly set.
5355
DEFAULT_MESSAGE = 'If you use this software in your work, please cite ' \
54-
'it using the following metadata'.freeze
56+
'it using the following metadata'
5557

5658
# :call-seq:
5759
# new(title) -> Model

lib/cff/model_part.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Copyright (c) 2018 Robert Haines.
24
#
35
# Licensed under the Apache License, Version 2.0 (the "License");

0 commit comments

Comments
 (0)