-
Notifications
You must be signed in to change notification settings - Fork 9
/
.rubocop.yml
98 lines (85 loc) · 2.86 KB
/
.rubocop.yml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
require:
- rubocop-rails
- rubocop-rake
- rubocop-rspec
- rubocop-capybara
- rubocop-factory_bot
- ./lib/rubocop/cop/rspec/no_should_in_specs.rb
- ./lib/rubocop/cop/application_api_controller.rb
- ./lib/rubocop/cop/govuk/govuk_button_to.rb
- ./lib/rubocop/cop/govuk/govuk_link_to.rb
- ./lib/rubocop/cop/govuk/govuk_submit.rb
inherit_from:
- .rubocop_todo.yml
- ./config/rubocop/config/factory_bot.yml
- ./config/rubocop/config/layout.yml
- ./config/rubocop/config/lint.yml
- ./config/rubocop/config/metrics.yml
- ./config/rubocop/config/naming.yml
- ./config/rubocop/config/rails.yml
- ./config/rubocop/config/rake.yml
- ./config/rubocop/config/rspec.yml
- ./config/rubocop/config/style.yml
AllCops:
NewCops: enable
Exclude:
- 'bin/*'
- 'db/schema.rb'
- 'node_modules/**/*'
- 'config/application.rb'
- 'config/puma.rb'
- 'config/environments/*'
- 'config/initializers/nationalities.rb'
- 'features/support/env.rb'
- 'vendor/**/*'
- 'jmeter/**/*'
Bundler/OrderedGems:
Enabled: false
Style/OptionalBooleanParameter:
Exclude:
- 'app/workers/**/*'
# These files call RequestLocals.fetch. Unlike Hash#fetch it requires the
# fallback to be passed in a block
Style/RedundantFetchBlock:
Exclude:
- 'app/controllers/concerns/emit_request_events.rb'
- 'app/models/concerns/entity_events.rb'
RSpec/NoShouldInSpecs:
Enabled: true
Govuk:
Include:
- 'app/views/**/*'
- 'app/components/**/*'
Govuk/GovukLinkTo:
Exclude:
# link_to in components that use their own link classes
- 'app/components/utility/header_component.html.erb'
- 'app/components/support_interface/tile_component.html.erb'
# link_to in filter component
- 'app/components/utility/filter_component.html.erb'
# link_to in manual error summaries
- 'app/views/candidate_interface/references/review/show.html.erb'
- 'app/views/candidate_interface/unsubmitted_application_form/review.html.erb'
# link_to in footers
- 'app/views/layouts/_footer.html'
- 'app/views/layouts/_footer_meta_candidate.html.erb'
- 'app/views/layouts/_footer_meta_provider.html.erb'
# link_to for kaminari pagination links
- 'app/views/kaminari/_next_page.html.erb'
- 'app/views/kaminari/_prev_page.html.erb'
# TODO: These cops are broken (as of rubocop-rails 2.21.1) and need to be disabled
# until they are fixed by future versions of rubocop-rails
Rails/RedundantActiveRecordAllMethod:
Enabled: false
Rails/FindEach:
Enabled: false
Rails/WhereRange:
Enabled: false
Rails/CreateTableWithTimestamps:
Exclude:
- 'db/migrate/20191022145559_install_audited.rb'
- 'db/migrate/20191212113810_create_provider_users.rb'
Rails/DangerousColumnNames:
Exclude:
- 'db/migrate/20191022131332_create_id_on_application_choices.rb'
- 'db/migrate/20200124114452_add_primary_key_to_provider_users_providers.rb'