-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.rubocop.yml
146 lines (115 loc) · 2.67 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
inherit_from:
- .rubocop_todo.yml
require:
- rubocop-capybara
- rubocop-factory_bot
- rubocop-rails
- rubocop-rspec_rails
- rubocop-rspec
AllCops:
TargetRubyVersion: 3.0
NewCops: enable
Exclude:
- db/schema.rb
- node_modules/**/*
- bin/bundle
- bin/webpack
- bin/yarn
- bin/webpack-dev-server
- lib/tasks/auto_annotate_models.rake
Style/Documentation:
Enabled: false
Layout/ClassStructure:
Enabled: true
Layout/EmptyLinesAroundAccessModifier:
Exclude:
- spec/factories/payloads/repository.rb
Layout/SpaceBeforeFirstArg:
Exclude:
- app/views/api/**/**/*
Lint/AmbiguousBlockAssociation:
Exclude:
- spec/**/*
Metrics/AbcSize:
# The ABC size is a calculated magnitude, so this number can be an Integer or
# a Float.
Max: 17
Exclude:
- app/services/code_climate/update_repository_service.rb
- app/controllers/development_metrics_controller.rb
- db/**/*
Metrics/BlockLength:
CountComments: false # count full line comments?
Max: 25
Exclude:
- config/**/*
- spec/**/*
- app/admin/**/*
- db/**/*
Metrics/BlockNesting:
Max: 4
Metrics/ClassLength:
CountComments: false # count full line comments?
Max: 200
# Avoid complex methods.
Metrics/CyclomaticComplexity:
Max: 6
Metrics/MethodLength:
CountComments: false # count full line comments?
Max: 24
Metrics/ModuleLength:
CountComments: false # count full line comments?
Max: 200
Layout/LineLength:
Max: 100
# To make it possible to copy or click on URIs in the code, we allow lines
# containing a URI to be longer than Max.
AllowURI: true
AllowedPatterns: ['stub_request']
URISchemes:
- http
- https
Exclude:
- config/environments/*
- config/initializers/*
- db/**/*
Metrics/ParameterLists:
Max: 5
CountKeywordArgs: true
Exclude:
- app/services/code_climate/repository_summary.rb
- app/services/code_climate/repositories_summary.rb
Metrics/PerceivedComplexity:
Max: 12
Naming/RescuedExceptionsVariableName:
PreferredName: exception
Rails:
Enabled: true
Rails/Delegate:
Enabled: true
Rails/FilePath:
Enabled: false
Rails/SaveBang:
Enabled: true
Style/BlockDelimiters:
EnforcedStyle: braces_for_chaining
Style/ExpandPathArguments:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/ModuleFunction:
Enabled: false
Style/ReturnNil:
Enabled: true
Style/BlockComments:
Enabled: false
SkipsModelValidations:
Exclude:
- app/services/processors/org_users_updater.rb
- db/migrate/*.rb
Rails/HelperInstanceVariable:
Exclude:
- app/helpers/meta_tags_helper.rb
Rails/HasManyOrHasOneDependent:
Exclude:
- app/models/repository.rb