Skip to content

Commit

Permalink
Cleanup Rubocop config, fix offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez committed Aug 28, 2024
1 parent 4864774 commit 89e152a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 30 deletions.
29 changes: 1 addition & 28 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AllCops:
- bin/*
- spec/**/*

Gemspec/AddRuntimeDependency:
Gemspec/RequireMFA:
Enabled: false

Style/Documentation:
Expand All @@ -32,33 +32,6 @@ Layout/EmptyLinesAroundBlockBody:
Layout/EmptyLinesAroundModuleBody:
Enabled: false

Layout/LineLength:
Enabled: false

Metrics/MethodLength:
Max: 12

Layout/HashAlignment:
EnforcedColonStyle: table
EnforcedHashRocketStyle: table

Lint/RaiseException:
Enabled: true

Lint/StructNewOverride:
Enabled: true

Style/HashEachMethods:
Enabled: true

Style/HashTransformKeys:
Enabled: true

Style/HashTransformValues:
Enabled: true

Gemspec/DevelopmentDependencies:
Enabled: false

Gemspec/RequireMFA:
Enabled: false
2 changes: 1 addition & 1 deletion lib/active_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ def traverse_config(hash)
end
result
end
# rubocop:enable Metrics/MethodLength

def traverse_array(array)
array.map do |value|
Expand All @@ -160,6 +159,7 @@ def traverse_array(array)
end
end
end
# rubocop:enable Metrics/MethodLength

def freeze_config(hash)
hash.each_value do |v|
Expand Down
3 changes: 2 additions & 1 deletion lib/active_settings/validation/validate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ def validate!

return if v_res.success?

raise ActiveSettings::Validation::Error, "ActiveSettings validation failed:\n\n#{ActiveSettings::Validation::Error.format(v_res, ActiveSettings.env_prefix)}"
message = ActiveSettings::Validation::Error.format(v_res, ActiveSettings.env_prefix)
raise ActiveSettings::Validation::Error, "ActiveSettings validation failed:\n\n#{message}"
end

end
Expand Down

0 comments on commit 89e152a

Please sign in to comment.