Skip to content

Commit

Permalink
Freeze mutable objects assigned to constants
Browse files Browse the repository at this point in the history
Fixes cookstyle complaint:

Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Inspecting 597 files
...............................................................C.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Offenses:

cookbooks/db/recipes/master.rb:87:22: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
CGIMAP_PERMISSIONS = { ...
                     ^
cookbooks/db/recipes/master.rb:122:26: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
PLANETDUMP_PERMISSIONS = { ...
                         ^
cookbooks/db/recipes/master.rb:128:26: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
PLANETDIFF_PERMISSIONS = { ...
                         ^

597 files inspected, 3 offenses detected, 3 offenses auto-correctable
  • Loading branch information
grischard authored Oct 6, 2023
1 parent 8ee7a7b commit 7447149
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cookbooks/db/recipes/master.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@
"way_nodes" => [:select, :insert],
"way_tags" => [:select, :insert],
"ways" => [:select, :insert]
}
}.freeze

PLANETDUMP_PERMISSIONS = {
"note_comments" => :select,
"notes" => :select,
"users" => :select
}
}.freeze

PLANETDIFF_PERMISSIONS = {
"changeset_comments" => :select,
Expand All @@ -138,7 +138,7 @@
"way_nodes" => :select,
"way_tags" => :select,
"ways" => :select
}
}.freeze

%w[
acls
Expand Down

0 comments on commit 7447149

Please sign in to comment.