-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.rubocop.yml
More file actions
74 lines (63 loc) · 1.98 KB
/
.rubocop.yml
File metadata and controls
74 lines (63 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
inherit_from: .rubocop_todo.yml
inherit_gem:
defra_ruby_style:
- default.yml
plugins:
- rubocop-capybara
- rubocop-factory_bot
- rubocop-rails
- rubocop-rspec
- rubocop-rspec_rails
AllCops:
TargetRubyVersion: 3.2
Exclude:
# Avoid pulling in gems for GitHub setup-ruby@v1 action:
- vendor/bundle/**/*
# This is auto-generated:
- spec/dummy/db/schema.rb
# Externally sourced files:
- bin/*
- spec/dummy/bin/*
# These files are not actively maintained but are retained for reference:
- db/old_migrations/**/*
# I've noticed this rule has been violated across some files and inline disable being used to suppress it
# It makes sense to increase the max length to a reasonable value
Metrics/ClassLength:
Max: 500
# Not all methods returning a boolean are predicates
Naming/PredicateMethod:
Exclude:
- app/presenters/pafs_core/validation_presenter.rb
- app/services/pafs_core/antivirus_service.rb
- app/services/pafs_core/spreadsheet/contributors/coerce/boolean.rb
- app/steps/pafs_core/*_step.rb
# Allow "for" in context names
RSpec/ContextWording:
Prefixes:
- when
- with
- without
- if
- unless
- for
RSpec/DescribeClass:
Exclude:
# This cop is n/a for rake tasks
- spec/lib/tasks/*
# this rule seems overly fussy:
RSpec/IndexedLet:
Enabled: false
RSpec/NestedGroups:
Exclude:
# Extra nesting tolerated as hexdigest behaviour is conditional on multiple factors.
- spec/controllers/pafs_core/projects_controller_spec.rb
# This is required in app/services/pafs_core/download/base.rb
# but adding a disable directive there causes rubocop to complain
# about an unnecessary disable directive, so disabling it here instead.
Style/RedundantInitialize:
Exclude:
- app/services/pafs_core/download/base.rb
# File.open without block is needed where callers expect an IO object;
# refactoring requires upstream interface changes — deferring to a separate PR.
Style/FileOpen:
Enabled: false