Skip to content

Commit d92a090

Browse files
Add inherit_mode merge for Exclude arrays in child configs
Without inherit_mode merge, child Exclude arrays replace the parent's instead of merging with them. This was causing all root exclusions (node_modules, tmp, coverage, etc.) to be lost in the child configs. Co-authored-by: Ihab Adham <ihabadham@users.noreply.github.com>
1 parent e48275d commit d92a090

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

react_on_rails/.rubocop.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Inherits from root config
22
inherit_from: ../.rubocop.yml
33

4+
# Merge Exclude arrays with parent instead of replacing them
5+
inherit_mode:
6+
merge:
7+
- Exclude
8+
49
AllCops:
510
SuggestExtensions: false
611

react_on_rails_pro/.rubocop.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Inherits from root config
22
inherit_from: ../.rubocop.yml
33

4+
# Merge Exclude arrays with parent instead of replacing them
5+
inherit_mode:
6+
merge:
7+
- Exclude
8+
49
AllCops:
510
Exclude:
611
<% `git status --ignored --porcelain`.lines.grep(/^!! /).each do |path| %>

0 commit comments

Comments
 (0)