-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.rubocop.yml
121 lines (95 loc) · 3.71 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
# NOTE: This is a copy from https://github.com/yast/yast-devtools/blob/master/ytools/y2tool/rubocop_yast_style.yml
################################################################################
#
# This part contains the shared Rubocop configuration for SUSE projects. It is
# maintained at https://github.com/SUSE/style-guides/blob/master/rubocop-suse.yml
#
# NOTE: some rules have been commented out, see the YaST specific changes
# at the end of the file!
#
################################################################################
# Disabled, would require too many changes in the current code
#Lint/EndAlignment:
# StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#lintendalignment
# AlignWith: variable
Metrics/AbcSize:
StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#metricsabcsize
Max: 30
Metrics/LineLength:
StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#metricslinelength
Max: 100
# To make it possible to copy or click on URIs in the code, we allow lines
# contaning a URI to be longer than Max.
AllowURI: true
URISchemes:
- http
- https
Layout/AlignHash:
StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylealignhash
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
# Disabled, see the YaST default at the end of the file
#Style/AlignParameters:
# StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylealignparameters
# Enabled: false
Style/CollectionMethods:
StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylecollectionmethods
Enabled: false
Layout/EmptyLinesAroundBlockBody:
StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#styleemptylinesaroundblockbody
Enabled: false
Layout/MultilineOperationIndentation:
StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylemultilineoperationindentation
EnforcedStyle: indented
Style/StringLiterals:
StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylestringliterals
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#stylestringliteralsininterpolation
EnforcedStyle: double_quotes
# Less magic syntax is better than ease of typing
Style/SymbolArray:
Enabled: false
Style/WordArray:
StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#deviations-from-the-upstream-style-guide
Enabled: false
Style/RegexpLiteral:
StyleGuide: https://github.com/SUSE/style-guides/blob/master/Ruby.md#deviations-from-the-upstream-style-guide
Enabled: false
Style/SignalException:
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
EnforcedStyle: only_raise
################################################################################
#
# This part contains the YaST specific changes to the shared SUSE configuration
#
################################################################################
# the stated reasons in the style guide neglect our use case of
# producing a Boolean attribute
Style/DoubleNegation:
Enabled: false
# no extra indentation for multiline function calls
Layout/AlignParameters:
EnforcedStyle: with_fixed_indentation
# no extra indentation for case
Layout/CaseIndentation:
EnforcedStyle: end
# "unless" has a different connotation than "if not"
Style/NegatedIf:
Enabled: false
# allow more than 10 lines for methods
Metrics/MethodLength:
Max: 30
Metrics/ClassLength:
Max: 250
Metrics/BlockLength:
Exclude:
- '**/*.gemspec'
Layout/IndentHeredoc:
Enabled: false
AllCops:
# do not check the locally installed gems
Exclude:
- '.vendor/**/*'
- 'vendor/**/*'
- 'package/*.spec'