Skip to content

Add frozen_string_literal: false to files that modify strings and run tests with frozen strings #640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/integration-compute-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ concurrency:
jobs:
test-compute:
runs-on: fog-arc-runner
env:
RUBYOPT: "--enable-frozen-string-literal"
strategy:
matrix:
ruby-version: [ '3.0', '3.1', '3.2' ]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/integration-compute-instance_groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ concurrency:
jobs:
test:
runs-on: fog-arc-runner
env:
RUBYOPT: "--enable-frozen-string-literal"
strategy:
matrix:
ruby-version: [ '3.0', '3.1', '3.2' ]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/integration-compute-loadbalancing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ concurrency:
jobs:
test:
runs-on: fog-arc-runner
env:
RUBYOPT: "--enable-frozen-string-literal"
strategy:
matrix:
ruby-version: [ '3.0', '3.1', '3.2' ]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/integration-compute-networking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ concurrency:
jobs:
test:
runs-on: fog-arc-runner
env:
RUBYOPT: "--enable-frozen-string-literal"
strategy:
matrix:
ruby-version: [ '3.0', '3.1', '3.2' ]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/integration-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ concurrency:
jobs:
test:
runs-on: fog-arc-runner
env:
RUBYOPT: "--enable-frozen-string-literal"
strategy:
matrix:
ruby-version: [ '3.0', '3.1', '3.2' ]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/integration-pubsub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ concurrency:
jobs:
test:
runs-on: fog-arc-runner
env:
RUBYOPT: "--enable-frozen-string-literal"
strategy:
matrix:
ruby-version: [ '3.0', '3.1', '3.2' ]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/integration-sql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ concurrency:
jobs:
test:
runs-on: fog-arc-runner
env:
RUBYOPT: "--enable-frozen-string-literal"
strategy:
matrix:
ruby-version: [ '3.0', '3.1', '3.2' ]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/integration-storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ concurrency:
jobs:
test:
runs-on: fog-arc-runner
env:
RUBYOPT: "--enable-frozen-string-literal"
strategy:
matrix:
ruby-version: [ '3.0', '3.1', '3.2' ]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ concurrency:
jobs:
test-unit:
runs-on: ubuntu-latest
env:
RUBYOPT: "--enable-frozen-string-literal"
strategy:
matrix:
ruby-version: [ '3.0', '3.1', '3.2', 'head', 'truffleruby-head']
Expand Down
4 changes: 3 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Style/FormatString:
Style/RegexpLiteral:
Enabled: false

#TODO: this needs to be adressed not through the linter
# TODO: Some files modify strings in place, so we need to disable this cop.
# ci runs with RUBYOPT="--enable-frozen-string-literal", files that modify
# strings have frozen_string_literal: false.
Style/FrozenStringLiteralComment:
Enabled: false

Expand Down
2 changes: 2 additions & 0 deletions lib/fog/google/storage/storage_json/real.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: false

module Fog
module Google
class StorageJSON
Expand Down
2 changes: 2 additions & 0 deletions lib/fog/google/storage/storage_json/utils.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: false

require "addressable"

module Fog
Expand Down
2 changes: 2 additions & 0 deletions lib/fog/google/storage/storage_xml/real.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: false

module Fog
module Google
class StorageXML
Expand Down
2 changes: 2 additions & 0 deletions lib/fog/google/storage/storage_xml/utils.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: false

module Fog
module Google
class StorageXML
Expand Down