Skip to content

Freeze mutable constants#5966

Merged
jeffwidman merged 1 commit intomainfrom
fix-rubocop-mutable-freeze-warnings
Jul 17, 2023
Merged

Freeze mutable constants#5966
jeffwidman merged 1 commit intomainfrom
fix-rubocop-mutable-freeze-warnings

Conversation

@jeffwidman
Copy link
Copy Markdown
Member

Rubocop is warning about mutable constants that should be frozen.

These warnings started showing up as part of the Ruby 3.1 upgrade, and were excluded from that PR in order to minimize noise.

So this PR fixes those warnings.

@jeffwidman
Copy link
Copy Markdown
Member Author

Not sure why this is passing... locally this fails all over the place for me... 😕 ?? May need #5959 to land first, as locally I'm running 1.37.1 already in the docker dev shell somehow.

@jeffwidman jeffwidman force-pushed the fix-rubocop-mutable-freeze-warnings branch from 46bc765 to f326130 Compare October 25, 2022 19:36
@jeffwidman jeffwidman force-pushed the fix-rubocop-mutable-freeze-warnings branch from f326130 to df3f16d Compare December 2, 2022 02:12
@jeffwidman jeffwidman force-pushed the fix-rubocop-mutable-freeze-warnings branch from df3f16d to b8844f6 Compare February 12, 2023 05:28
@jeffwidman jeffwidman force-pushed the fix-rubocop-mutable-freeze-warnings branch from b8844f6 to 6ba910e Compare July 16, 2023 08:43
@github-actions github-actions bot added L: elixir:hex Elixir packages via hex L: java:gradle Maven packages via Gradle L: go:modules Golang modules L: elm Elm packages L: terraform Terraform packages L: rust:cargo Rust crates via cargo L: java:maven Maven packages via Maven L: dart:pub Dart packages via pub L: javascript L: python labels Jul 16, 2023
@jeffwidman
Copy link
Copy Markdown
Member Author

This throws a lot fewer warnings for me now, not sure if we've changed our code or upstream fixed some bugs... regardless, the changes from rubocop -A still look reasonable to me, so marking this as ready for review/merge.

@jeffwidman jeffwidman marked this pull request as ready for review July 16, 2023 09:03
@jeffwidman jeffwidman requested a review from a team as a code owner July 16, 2023 09:03
@jeffwidman jeffwidman force-pushed the fix-rubocop-mutable-freeze-warnings branch 2 times, most recently from c75a16c to 83ad288 Compare July 17, 2023 19:28
@jeffwidman jeffwidman changed the title Fix Rubocop warnings about mutable constants that should be frozen Freeze mutable constants Jul 17, 2023
@jeffwidman jeffwidman enabled auto-merge (squash) July 17, 2023 19:28
Rubocop is warning about mutable constants that should be frozen.

These warnings started showing up as part of the Ruby 3.1 upgrade, and
were excluded from that PR in order to minimize noise.

So this PR fixes those warnings.

I resolved them using `rubocop -A` and then visually inspecting them to
confirm they looked reasonable.
@jeffwidman jeffwidman force-pushed the fix-rubocop-mutable-freeze-warnings branch from 83ad288 to 2e45e5b Compare July 17, 2023 20:04
@jeffwidman jeffwidman merged commit 23de1c7 into main Jul 17, 2023
@jeffwidman jeffwidman deleted the fix-rubocop-mutable-freeze-warnings branch July 17, 2023 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L: dart:pub Dart packages via pub L: elixir:hex Elixir packages via hex L: elm Elm packages L: go:modules Golang modules L: java:gradle Maven packages via Gradle L: java:maven Maven packages via Maven L: javascript L: python L: rust:cargo Rust crates via cargo L: terraform Terraform packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants