Skip to content

Commit 2a2bbc5

Browse files
committed
default config: only include paths relative to cwd
1 parent 9934f34 commit 2a2bbc5

File tree

1 file changed

+56
-56
lines changed

1 file changed

+56
-56
lines changed

config/default.yml

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ inherit_mode:
66

77
AllCops:
88
Exclude:
9-
- '**/app/assets/**/*'
9+
- '{,./**/}app/assets/**/*'
1010
- bin/*
1111
# Exclude db/schema.rb and db/[CONFIGURATION_NAMESPACE]_schema.rb by default.
1212
# See: https://guides.rubyonrails.org/active_record_multiple_databases.html#setting-up-your-application
@@ -94,8 +94,8 @@ Lint/UselessAccessModifier:
9494
Lint/UselessMethodDefinition:
9595
# Avoids conflict with `Rails/LexicallyScopedActionFilter` cop.
9696
Exclude:
97-
- '**/app/controllers/**/*.rb'
98-
- '**/app/mailers/**/*.rb'
97+
- '{,./**/}app/controllers/**/*.rb'
98+
- '{,./**/}app/mailers/**/*.rb'
9999

100100
Rails:
101101
Enabled: true
@@ -115,7 +115,7 @@ Rails/ActionControllerTestCase:
115115
SafeAutoCorrect: false
116116
VersionAdded: '2.14'
117117
Include:
118-
- '**/test/**/*.rb'
118+
- '{,./**/}test/**/*.rb'
119119

120120
Rails/ActionFilter:
121121
Description: 'Enforces consistent use of action filter methods.'
@@ -127,8 +127,8 @@ Rails/ActionFilter:
127127
- action
128128
- filter
129129
Include:
130-
- '**/app/controllers/**/*.rb'
131-
- '**/app/mailers/**/*.rb'
130+
- '{,./**/}app/controllers/**/*.rb'
131+
- '{,./**/}app/mailers/**/*.rb'
132132

133133
Rails/ActionOrder:
134134
Description: 'Enforce consistent ordering of controller actions.'
@@ -143,7 +143,7 @@ Rails/ActionOrder:
143143
- update
144144
- destroy
145145
Include:
146-
- '**/app/controllers/**/*.rb'
146+
- '{,./**/}app/controllers/**/*.rb'
147147

148148
Rails/ActiveRecordAliases:
149149
Description: >-
@@ -160,7 +160,7 @@ Rails/ActiveRecordCallbacksOrder:
160160
Enabled: 'pending'
161161
VersionAdded: '2.7'
162162
Include:
163-
- '**/app/models/**/*.rb'
163+
- '{,./**/}app/models/**/*.rb'
164164

165165
Rails/ActiveRecordOverride:
166166
Description: >-
@@ -171,7 +171,7 @@ Rails/ActiveRecordOverride:
171171
VersionAdded: '0.67'
172172
VersionChanged: '2.18'
173173
Include:
174-
- '**/app/models/**/*.rb'
174+
- '{,./**/}app/models/**/*.rb'
175175

176176
Rails/ActiveSupportAliases:
177177
Description: >-
@@ -251,14 +251,14 @@ Rails/AssertNot:
251251
Enabled: true
252252
VersionAdded: '0.56'
253253
Include:
254-
- '**/test/**/*'
254+
- '{,./**/}test/**/*'
255255

256256
Rails/AttributeDefaultBlockValue:
257257
Description: 'Pass method call in block for attribute option `default`.'
258258
Enabled: pending
259259
VersionAdded: '2.9'
260260
Include:
261-
- '**/app/models/**/*'
261+
- '{,./**/}app/models/**/*'
262262

263263
Rails/BelongsTo:
264264
Description: >-
@@ -317,8 +317,8 @@ Rails/ContentTag:
317317
# https://puma.io/puma/Puma/DSL.html#tag-instance_method
318318
# No helpers are used in normal models and configs.
319319
Exclude:
320-
- '**/app/models/**/*.rb'
321-
- '**/config/**/*.rb'
320+
- '{,./**/}app/models/**/*.rb'
321+
- '{,./**/}config/**/*.rb'
322322

323323
Rails/CreateTableWithTimestamps:
324324
Description: >-
@@ -379,7 +379,7 @@ Rails/Delegate:
379379
# violation. When set to false, this case is legal.
380380
EnforceForPrefixed: true
381381
Exclude:
382-
- '**/app/controllers/**/*.rb'
382+
- '{,./**/}app/controllers/**/*.rb'
383383

384384
Rails/DelegateAllowBlank:
385385
Description: 'Do not use allow_blank as an option to delegate.'
@@ -450,23 +450,23 @@ Rails/EnumHash:
450450
Enabled: true
451451
VersionAdded: '2.3'
452452
Include:
453-
- '**/app/models/**/*.rb'
453+
- '{,./**/}app/models/**/*.rb'
454454

455455
Rails/EnumSyntax:
456456
Description: 'Use positional arguments over keyword arguments when defining enums.'
457457
Enabled: pending
458458
Severity: warning
459459
VersionAdded: '2.26'
460460
Include:
461-
- '**/app/models/**/*.rb'
462-
- '**/lib/**/*.rb'
461+
- '{,./**/}app/models/**/*.rb'
462+
- '{,./**/}lib/**/*.rb'
463463

464464
Rails/EnumUniqueness:
465465
Description: 'Avoid duplicate integers in hash-syntax `enum` declaration.'
466466
Enabled: true
467467
VersionAdded: '0.46'
468468
Include:
469-
- '**/app/models/**/*.rb'
469+
- '{,./**/}app/models/**/*.rb'
470470

471471
Rails/EnvLocal:
472472
Description: 'Use `Rails.env.local?` instead of `Rails.env.development? || Rails.env.test?`.'
@@ -485,11 +485,11 @@ Rails/EnvironmentVariableAccess:
485485
VersionAdded: '2.10'
486486
VersionChanged: '2.24'
487487
Include:
488-
- '**/app/**/*.rb'
489-
- '**/config/initializers/**/*.rb'
490-
- '**/lib/**/*.rb'
488+
- '{,./**/}app/**/*.rb'
489+
- '{,./**/}config/initializers/**/*.rb'
490+
- '{,./**/}lib/**/*.rb'
491491
Exclude:
492-
- '**/lib/**/*.rake'
492+
- '{,./**/}lib/**/*.rake'
493493
AllowReads: false
494494
AllowWrites: false
495495

@@ -501,11 +501,11 @@ Rails/Exit:
501501
Enabled: true
502502
VersionAdded: '0.41'
503503
Include:
504-
- '**/app/**/*.rb'
505-
- '**/config/**/*.rb'
506-
- '**/lib/**/*.rb'
504+
- '{,./**/}app/**/*.rb'
505+
- '{,./**/}config/**/*.rb'
506+
- '{,./**/}lib/**/*.rb'
507507
Exclude:
508-
- '**/lib/**/*.rake'
508+
- '{,./**/}lib/**/*.rake'
509509

510510
Rails/ExpandedDateRange:
511511
Description: 'Checks for expanded date range.'
@@ -574,22 +574,22 @@ Rails/HasAndBelongsToMany:
574574
Enabled: true
575575
VersionAdded: '0.12'
576576
Include:
577-
- '**/app/models/**/*.rb'
577+
- '{,./**/}app/models/**/*.rb'
578578

579579
Rails/HasManyOrHasOneDependent:
580580
Description: 'Define the dependent option to the has_many and has_one associations.'
581581
StyleGuide: 'https://rails.rubystyle.guide#has_many-has_one-dependent-option'
582582
Enabled: true
583583
VersionAdded: '0.50'
584584
Include:
585-
- '**/app/models/**/*.rb'
585+
- '{,./**/}app/models/**/*.rb'
586586

587587
Rails/HelperInstanceVariable:
588588
Description: 'Do not use instance variables in helpers.'
589589
Enabled: true
590590
VersionAdded: '2.0'
591591
Include:
592-
- '**/app/helpers/**/*.rb'
592+
- '{,./**/}app/helpers/**/*.rb'
593593

594594
Rails/HttpPositionalArguments:
595595
Description: 'Use keyword arguments instead of positional arguments in http method calls.'
@@ -620,7 +620,7 @@ Rails/I18nLazyLookup:
620620
- lazy
621621
- explicit
622622
Include:
623-
- '**/app/controllers/**/*.rb'
623+
- '{,./**/}app/controllers/**/*.rb'
624624

625625
Rails/I18nLocaleAssignment:
626626
Description: 'Prefer the usage of `I18n.with_locale` instead of manually updating `I18n.locale` value.'
@@ -649,8 +649,8 @@ Rails/IgnoredSkipActionFilterOption:
649649
Enabled: true
650650
VersionAdded: '0.63'
651651
Include:
652-
- '**/app/controllers/**/*.rb'
653-
- '**/app/mailers/**/*.rb'
652+
- '{,./**/}app/controllers/**/*.rb'
653+
- '{,./**/}app/mailers/**/*.rb'
654654

655655
Rails/IndexBy:
656656
Description: 'Prefer `index_by` over `each_with_object`, `to_h`, or `map`.'
@@ -680,7 +680,7 @@ Rails/InverseOf:
680680
VersionAdded: '0.52'
681681
IgnoreScopes: false
682682
Include:
683-
- '**/app/models/**/*.rb'
683+
- '{,./**/}app/models/**/*.rb'
684684

685685
Rails/LexicallyScopedActionFilter:
686686
Description: "Checks that methods specified in the filter's `only` or `except` options are explicitly defined in the class."
@@ -689,8 +689,8 @@ Rails/LexicallyScopedActionFilter:
689689
Safe: false
690690
VersionAdded: '0.52'
691691
Include:
692-
- '**/app/controllers/**/*.rb'
693-
- '**/app/mailers/**/*.rb'
692+
- '{,./**/}app/controllers/**/*.rb'
693+
- '{,./**/}app/mailers/**/*.rb'
694694

695695
Rails/LinkToBlank:
696696
Description: 'Checks that `link_to` with a `target: "_blank"` have a `rel: "noopener"` option passed to them.'
@@ -708,7 +708,7 @@ Rails/MailerName:
708708
SafeAutoCorrect: false
709709
VersionAdded: '2.7'
710710
Include:
711-
- '**/app/mailers/**/*.rb'
711+
- '{,./**/}app/mailers/**/*.rb'
712712

713713
Rails/MatchRoute:
714714
Description: >-
@@ -718,8 +718,8 @@ Rails/MatchRoute:
718718
Enabled: 'pending'
719719
VersionAdded: '2.7'
720720
Include:
721-
- '**/config/routes.rb'
722-
- '**/config/routes/**/*.rb'
721+
- '{,./**/}config/routes.rb'
722+
- '{,./**/}config/routes/**/*.rb'
723723

724724
Rails/MigrationClassName:
725725
Description: 'The class name of the migration should match its file name.'
@@ -735,8 +735,8 @@ Rails/MultipleRoutePaths:
735735
Severity: warning
736736
VersionAdded: '2.29'
737737
Include:
738-
- '**/config/routes.rb'
739-
- '**/config/routes/**/*.rb'
738+
- '{,./**/}config/routes.rb'
739+
- '{,./**/}config/routes/**/*.rb'
740740

741741
Rails/NegateInclude:
742742
Description: 'Prefer `collection.exclude?(obj)` over `!collection.include?(obj)`.'
@@ -779,10 +779,10 @@ Rails/Output:
779779
VersionAdded: '0.15'
780780
VersionChanged: '0.19'
781781
Include:
782-
- '**/app/**/*.rb'
783-
- '**/config/**/*.rb'
782+
- '{,./**/}app/**/*.rb'
783+
- '{,./**/}config/**/*.rb'
784784
- db/**/*.rb
785-
- '**/lib/**/*.rb'
785+
- '{,./**/}lib/**/*.rb'
786786

787787
Rails/OutputSafety:
788788
Description: 'The use of `html_safe` or `raw` may be a security risk.'
@@ -851,10 +851,10 @@ Rails/RakeEnvironment:
851851
VersionAdded: '2.4'
852852
VersionChanged: '2.6'
853853
Include:
854-
- '**/Rakefile'
855-
- '**/*.rake'
854+
- '{,./**/}Rakefile'
855+
- '{,./**/}*.rake'
856856
Exclude:
857-
- '**/lib/capistrano/tasks/**/*.rake'
857+
- '{,./**/}lib/capistrano/tasks/**/*.rake'
858858

859859
Rails/ReadWriteAttribute:
860860
Description: >-
@@ -865,7 +865,7 @@ Rails/ReadWriteAttribute:
865865
VersionAdded: '0.20'
866866
VersionChanged: '0.29'
867867
Include:
868-
- '**/app/models/**/*.rb'
868+
- '{,./**/}app/models/**/*.rb'
869869

870870
Rails/RedundantActiveRecordAllMethod:
871871
Description: Detect redundant `all` used as a receiver for Active Record query methods.
@@ -884,7 +884,7 @@ Rails/RedundantAllowNil:
884884
Enabled: true
885885
VersionAdded: '0.67'
886886
Include:
887-
- '**/app/models/**/*.rb'
887+
- '{,./**/}app/models/**/*.rb'
888888

889889
Rails/RedundantForeignKey:
890890
Description: 'Checks for associations where the `:foreign_key` option is redundant.'
@@ -926,7 +926,7 @@ Rails/RefuteMethods:
926926
- assert_not
927927
- refute
928928
Include:
929-
- '**/test/**/*'
929+
- '{,./**/}test/**/*'
930930

931931
Rails/RelativeDateConstant:
932932
Description: 'Do not assign relative date to constants.'
@@ -1055,7 +1055,7 @@ Rails/ScopeArgs:
10551055
VersionAdded: '0.19'
10561056
VersionChanged: '2.12'
10571057
Include:
1058-
- '**/app/models/**/*.rb'
1058+
- '{,./**/}app/models/**/*.rb'
10591059

10601060
Rails/SelectMap:
10611061
Description: 'Checks for uses of `select(:column_name)` with `map(&:column_name)`.'
@@ -1124,7 +1124,7 @@ Rails/StrongParametersExpect:
11241124
Reference: 'https://api.rubyonrails.org/classes/ActionController/Parameters.html#method-i-expect'
11251125
Enabled: pending
11261126
Include:
1127-
- '**/app/controllers/**/*.rb'
1127+
- '{,./**/}app/controllers/**/*.rb'
11281128
SafeAutoCorrect: false
11291129
VersionAdded: '2.29'
11301130

@@ -1135,7 +1135,7 @@ Rails/TableNameAssignment:
11351135
Enabled: false
11361136
VersionAdded: '2.14'
11371137
Include:
1138-
- '**/app/models/**/*.rb'
1138+
- '{,./**/}app/models/**/*.rb'
11391139

11401140
Rails/ThreeStateBooleanColumn:
11411141
Description: 'Add a default value and a `NOT NULL` constraint to boolean columns.'
@@ -1160,7 +1160,7 @@ Rails/TimeZone:
11601160
- strict
11611161
- flexible
11621162
Exclude:
1163-
- '**/*.gemspec'
1163+
- '{,./**/}*.gemspec'
11641164

11651165
Rails/TimeZoneAssignment:
11661166
Description: 'Prefer the usage of `Time.use_zone` instead of manually updating `Time.zone` value.'
@@ -1219,7 +1219,7 @@ Rails/UniqueValidationWithoutIndex:
12191219
Enabled: true
12201220
VersionAdded: '2.5'
12211221
Include:
1222-
- '**/app/models/**/*.rb'
1222+
- '{,./**/}app/models/**/*.rb'
12231223

12241224
Rails/UnknownEnv:
12251225
Description: 'Use correct environment name.'
@@ -1238,7 +1238,7 @@ Rails/UnusedIgnoredColumns:
12381238
VersionAdded: '2.11'
12391239
VersionChanged: '2.25'
12401240
Include:
1241-
- '**/app/models/**/*.rb'
1241+
- '{,./**/}app/models/**/*.rb'
12421242

12431243
Rails/UnusedRenderContent:
12441244
Description: 'Do not specify body content for a response with a non-content status code.'
@@ -1252,7 +1252,7 @@ Rails/Validation:
12521252
VersionAdded: '0.9'
12531253
VersionChanged: '0.41'
12541254
Include:
1255-
- '**/app/models/**/*.rb'
1255+
- '{,./**/}app/models/**/*.rb'
12561256

12571257
Rails/WhereEquals:
12581258
Description: 'Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL.'

0 commit comments

Comments
 (0)