Skip to content

Commit ffacf8a

Browse files
authored
Enable frozen_strings_literal (#626)
2 parents 92e893b + bceed35 commit ffacf8a

File tree

191 files changed

+423
-56
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+423
-56
lines changed

.rubocop.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ Style/EmptyMethod:
3030
Style/TrailingCommaInArrayLiteral:
3131
EnforcedStyleForMultiline: consistent_comma
3232

33-
# Enabling the 'frozen_string_literal: true' comment is nice but should be done with extra care
34-
# because enabling it on code that accidentally mutates string literals will crash at runtime
35-
# (e.g. `name = 'Hello'` then later `name << ' world'` will crash if the comment is enabled)
36-
# So we might enable it at some point, be we will need very careful review that this doesn't break everything.
37-
Style/FrozenStringLiteralComment:
38-
Enabled: false
39-
4033
# Unicode is pretty standard by now, and we want to be able to use em-dash, ellipsis, and unicode characters
4134
# to provide nice Monodraw.app graphs and similar, without being limited only by ascii.
4235
Style/AsciiComments:
@@ -48,7 +41,7 @@ Style/AsciiComments:
4841
# which would be incorrect and not what we want
4942
Style/StringConcatenation:
5043
Enabled: false
51-
44+
5245
# This rule was enforced after upgrading Rubocop from `1.22.1` to `1.50.2`. We are disabling this rule for the
5346
# time being so that we don't see any unexpected behavior when running Release Toolkit actions that could be
5447
# changed by this rule. See https://github.com/wordpress-mobile/release-toolkit/pull/464#pullrequestreview-1396569629

CHANGELOG.md

Lines changed: 1 addition & 1 deletion

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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'rake'
24
require 'tmpdir'
35

@@ -30,7 +32,7 @@ task :docstats, [:path] do |_, args|
3032
sh('yard', 'stats', '--list-undoc', path)
3133
end
3234

33-
GEM_NAME = 'fastlane-plugin-wpmreleasetoolkit'.freeze
35+
GEM_NAME = 'fastlane-plugin-wpmreleasetoolkit'
3436
VERSION_FILE = File.join('lib', 'fastlane', 'plugin', 'wpmreleasetoolkit', 'version.rb')
3537

3638
desc 'Create a new version of the release-toolkit gem'

fastlane-plugin-wpmreleasetoolkit.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
lib = File.expand_path('lib', __dir__)
24
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
35
require 'fastlane/plugin/wpmreleasetoolkit/version'

fastlane/Fastfile

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
lane :test do
24
wpmreleasetoolkit
35
end

lib/fastlane/plugin/wpmreleasetoolkit.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
require 'fastlane/plugin/wpmreleasetoolkit/version'
24

35
module Fastlane

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_localize_libs_action.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
require 'fastlane/action'
24
require_relative '../../helper/android/android_localize_helper'
35

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.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
require 'fastlane/action'
24
require_relative '../../helper/metadata/release_note_metadata_block'
35
require_relative '../../helper/metadata/release_note_short_metadata_block'

lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.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
require 'fastlane/action'
24
require_relative '../../helper/android/android_localize_helper'
35

0 commit comments

Comments
 (0)