Skip to content

Commit 1f19072

Browse files
authored
Merge pull request #647 from koic/exclude_db_schema_rb_and_db_configuration_namespace_schema_rb_by_default
[Fix #646] Exclude db/schema.rb and db/[CONFIGURATION_NAMESPACE]_schema.rb by default
2 parents 8d0e919 + 8782235 commit 1f19072

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* [#646](https://github.com/rubocop/rubocop-rails/issues/646): Exclude db/schema.rb and db/[CONFIGURATION_NAMESPACE]_schema.rb by default. ([@koic][])

config/default.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ inherit_mode:
77
AllCops:
88
Exclude:
99
- bin/*
10-
- db/schema.rb
10+
# Exclude db/schema.rb and db/[CONFIGURATION_NAMESPACE]_schema.rb by default.
11+
# See: https://guides.rubyonrails.org/active_record_multiple_databases.html#setting-up-your-application
12+
- db/*schema.rb
1113
# What version of Rails is the inspected code using? If a value is specified
1214
# for TargetRailsVersion then it is used. Acceptable values are specified
1315
# as a float (i.e. 5.1); the patch version of Rails should not be included.

spec/rubocop/rails/inject_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
expect(configuration['AllCops']['Exclude'])
1010
.to include(
1111
'/home/foo/project/bin/*',
12-
'/home/foo/project/db/schema.rb'
12+
'/home/foo/project/db/*schema.rb'
1313
)
1414
end
1515
end

0 commit comments

Comments
 (0)