Skip to content
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

Fix merge behaviours of configs #68

Merged
merged 5 commits into from
Nov 9, 2023
Merged
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: 1 addition & 1 deletion .hound.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ruby:
Enabled: true
config_file: ci/rubocop.yml
version: 1.5.2
version: 1.22.1
6 changes: 5 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ namespace :build do
aggregation = src.reduce({}) do |acc, file|
full_path = path_in_project(file)
y = YAML.safe_load(File.read(full_path))
acc.deep_merge(y)
acc.deep_merge!(
y,
sort_merged_arrays: true,
extend_existing_arrays: true,
)
end

target_full_path = path_in_project(to)
Expand Down
8 changes: 4 additions & 4 deletions ci/rubocop.rails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
---
AllCops:
Exclude:
- vendor/**/*
- db/**/*
- tmp/**/*
- db/schema.rb
- tmp/**/*
- vendor/**/*
DisplayCopNames: false
StyleGuideCopsOnly: false
TargetRubyVersion: 3.1
Expand Down Expand Up @@ -78,7 +78,7 @@ Style/ClassVars:
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
Enabled: false
Style/CollectionMethods:
Enabled: true
Enabled: false
PreferredMethods:
find: detect
inject: reduce
Expand Down Expand Up @@ -232,7 +232,7 @@ Naming/BinaryOperatorParameterName:
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
Enabled: false
Metrics/ParameterLists:
Description: Avoid parameter lists longer than three or four parameters.
Description: Avoid long parameter lists.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
Enabled: true
Max: 5
Expand Down
6 changes: 3 additions & 3 deletions ci/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
---
AllCops:
Exclude:
- vendor/**/*
- db/**/*
- tmp/**/*
- vendor/**/*
DisplayCopNames: false
StyleGuideCopsOnly: false
TargetRubyVersion: 3.1
Expand Down Expand Up @@ -75,7 +75,7 @@ Style/ClassVars:
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
Enabled: false
Style/CollectionMethods:
Enabled: true
Enabled: false
PreferredMethods:
find: detect
inject: reduce
Expand Down Expand Up @@ -229,7 +229,7 @@ Naming/BinaryOperatorParameterName:
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
Enabled: false
Metrics/ParameterLists:
Description: Avoid parameter lists longer than three or four parameters.
Description: Avoid long parameter lists.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
Enabled: true
Max: 5
Expand Down
8 changes: 6 additions & 2 deletions src/rubocop/rubocop.ribose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,18 @@ Style/CollectionMethods:
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma

# From 322cb2c179a721fed382a691124185a01811cf11
# Contrary to what hound apparently prefers
# (see 322cb2c179a721fed382a691124185a01811cf11),
# we prefer trailing dots.
Layout/DotPosition:
EnforcedStyle: leading
EnforcedStyle: trailing

# Delete following lines after migrating to Rubocop 2.x, as these checks
# will be enabled by default.
Style/ArgumentsForwarding:
Enabled: true

# Hound CI, being stuck on version 1.22.2 (as of 2023-11-09),
# does not recognize the following cop:
Gemspec/RequireMFA:
Enabled: false