-
Notifications
You must be signed in to change notification settings - Fork 39
/
.rubocop.yml
112 lines (95 loc) · 3.32 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Work around CodeClimate's inability to use Rubocop's inherit_gem directive:
# https://github.com/codeclimate/codeclimate-rubocop/issues/71#issuecomment-635055223
inherit_from:
- https://raw.githubusercontent.com/GSA/searchgov_style/main/.default.yml
inherit_mode:
merge:
- Exclude
- AllowedMethods
Layout/HashAlignment:
EnforcedHashRocketStyle:
- key
- table
EnforcedColonStyle:
- key
- table
Layout/FirstHashElementIndentation:
Exclude:
# These files use Kibana's JSON style for easier side-to-side comparison, copy/pasting, etc.
- spec/models/logstash_queries/**/*
- spec/models/custom_index_queries/**/*
Lint/SymbolConversion:
Exclude:
# These files use Kibana's JSON style for easier side-to-side comparison, copy/pasting, etc.
- spec/models/logstash_queries/**/*
- spec/models/custom_index_queries/**/*
Metrics/AbcSize:
Exclude:
# Exclude while SERP redesign under active development
- app/helpers/react_helper.rb
- lib/tasks/serp_design_updater.rake
Metrics/BlockLength:
Exclude:
# Exclude ActiveScaffold-based controllers
- app/controllers/admin/**/*
# Logstash query specs include lengthy, raw JSON queries
# for easier side-to-side comparison, copy/pasting, etc.
- spec/models/logstash_queries/**/*
- spec/models/custom_index_queries/**/*
Metrics/ModuleLength:
Exclude:
# Exclude while SERP redesign under active development
- app/helpers/react_helper.rb
Rake/MethodDefinitionInTask:
# Disabled because this cop fails incorrectly: https://github.com/rubocop/rubocop-rake/issues/42
Enabled: false
RSpec/DescribeClass:
Exclude:
- spec/internationalization/**/*
RSpec/InstanceVariable:
Exclude:
# 'let's do not work for the setting & resetting of config values
- spec/requests/omniauth-rails_csrf_protection_spec.rb
Style/ClassAndModuleChildren:
Enabled: false
Style/LambdaCall:
Exclude:
# Exclude files relying on Jbuilder DSL
# https://github.com/rubocop-hq/rubocop/issues/3402
- app/models/elastic_data/*
- app/models/custom_index_queries/*
- app/models/logstash_queries/*
- app/models/watcher.rb
- lib/analytics_dsl.rb
- lib/watcher_dsl.rb
Style/MethodCallWithArgsParentheses:
IgnoreMacros: true
Exclude:
# Exclude files relying on Jbuilder DSL
- app/models/elastic_data/*
- app/models/custom_index_queries/*
- app/models/logstash_queries/*
- app/models/watcher.rb
- lib/analytics_dsl.rb
- lib/watcher_dsl.rb
# Exclude ActiveScaffold-based controllers
- app/controllers/admin/**/*
Style/NumericLiterals:
Exclude:
# Exclude files that tend to contain long, numeric ID's
- spec/support/api_search_as_json_behavior.rb
Style/QuotedSymbols:
Exclude:
# These files use Kibana's JSON style for easier side-to-side comparison, copy/pasting, etc.
- spec/models/logstash_queries/**/*
- spec/models/custom_index_queries/**/*
Style/StringLiterals:
Exclude:
# These files use Kibana's JSON style for easier side-to-side comparison, copy/pasting, etc.
- spec/models/logstash_queries/**/*
- spec/models/custom_index_queries/**/*
Style/WordArray:
Exclude:
# These files use Kibana's JSON style for easier side-to-side comparison, copy/pasting, etc.
- spec/models/logstash_queries/**/*
- spec/models/custom_index_queries/**/*