forked from cyfronet-fid/marketplace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
171 lines (142 loc) · 4.26 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
inherit_gem:
prettier: rubocop.yml
AllCops:
TargetRubyVersion: 3.0.3
NewCops: enable
SuggestExtensions: true
Exclude:
- '**/tmp/**/*'
- '**/vendor/**/*'
- '**/node_modules/**/*'
- 'bin/**/*'
- 'db/schema.rb'
Layout/LineLength:
Enabled: true
Exclude:
- 'app/models/jira/checker.rb'
- 'app/models/jira/client.rb'
- 'config/initializers/devise.rb'
- 'db/migrate/**/*'
- 'lib/jms/subscriber.rb'
- 'spec/factories/jms_xml_provider.rb'
- 'spec/factories/jms_xml_service.rb'
- 'spec/factories/jms_service.rb'
- 'spec/factories/jms_providers_response.rb'
- 'spec/factories/eosc_registry_vocabularies_response.rb'
- 'spec/factories/eosc_registry_services_response.rb'
- 'spec/factories/eosc_registry_providers_response.rb'
- 'spec/helpers/service_helper_spec.rb'
- 'spec/lib/jira/console_checker_spec.rb'
- 'spec/requests/api/v1/omses/projects/project_items_controller_spec.rb'
Metrics/BlockNesting:
Enabled: true
Exclude:
- 'app/controllers/users/omniauth_callbacks_controller.rb'
- 'lib/import/resources.rb'
- 'lib/import/providers.rb'
Metrics/PerceivedComplexity:
Enabled: true
Max: 15
Exclude:
- 'app/models/jira/client.rb'
- 'app/services/importers/provider.rb'
- 'app/services/importers/service.rb'
- 'app/services/project_item/create.rb'
- 'app/services/service/pc_create_or_update.rb'
- 'lib/import/vocabularies.rb'
- 'lib/import/resources.rb'
- 'lib/import/providers.rb'
- 'lib/jira/console_checker.rb'
- 'lib/import/resources.rb'
Metrics/CyclomaticComplexity:
Enabled: true
Max: 15
Exclude:
- 'app/models/jira/client.rb'
- 'app/services/importers/provider.rb'
- 'app/services/importers/service.rb'
- 'app/services/service/pc_create_or_update.rb'
- 'lib/import/resources.rb'
- 'lib/jira/console_checker.rb'
- 'app/services/project_item/create.rb'
Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes
# Not necessary to enforce this, both forms are useful sometimes.
Style/ConditionalAssignment:
Enabled: false
# We don't really use such big numbers outside of port configuration, where it's counterproductive.
Style/NumericLiterals:
Enabled: false
# We didn't order gems from the beginning. Turning this on would mess history up.
Bundler/OrderedGems:
Enabled: false
# Turn off due conflict with prettier
Style/LineEndConcatenation:
Enabled: false
Style/InverseMethods:
Enabled: true
InverseMethods:
:present?: :blank?
# We do it a lot in HAMLs which are not auto-correctable
Style/FormatString:
Enabled: false
Style/StringLiteralsInInterpolation:
Enabled: true
EnforcedStyle: double_quotes
# These four force very small files, we don't really want that
Metrics/ModuleLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/BlockLength:
Enabled: false
# Make it more lax
Metrics/AbcSize:
Enabled: true
Max: 60
Exclude:
- 'db/migrate/**/*'
- 'app/services/importers/service.rb'
- 'app/services/importers/provider.rb'
- 'lib/import/resources.rb'
- 'lib/jira/console_checker.rb'
- 'app/services/service/pc_create_or_update.rb'
# Require docs for each class
Style/Documentation:
Enabled: false
# We do it a lot in HAMLs which are not auto-correctable
Style/RedundantInterpolation:
Enabled: false
# We do it in HAMLs to avoid other banned operations
Style/StringConcatenation:
Enabled: false
# We usually go for compact style, but in some places exploded version is necessary. Don't force
Style/ClassAndModuleChildren:
Enabled: false
Style/HashAsLastArrayItem:
Enabled: true
EnforcedStyle: no_braces
Style/FormatStringToken:
Enabled: true
EnforcedStyle: template
# Many changes, not much added value
Style/GuardClause:
Enabled: false
Metrics/ParameterLists:
Enabled: true
CountKeywordArgs: false
# This cop makes sure that predicates are named properly
Naming/PredicateName:
Enabled: true
AllowedMethods: has_attribute?
# Disable this in spec as per https://github.com/rubocop/rubocop/issues/4222#issuecomment-290655562
Lint/AmbiguousBlockAssociation:
Exclude:
- "spec/**/*"
Style/OpenStructUse:
Exclude:
- "spec/lib/import/providers_spec.rb"
- "spec/lib/import/resources_spec.rb"