forked from openSUSE/open-build-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
91 lines (70 loc) · 2.14 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
inherit_from: .rubocop_todo.yml
require:
- rubocop-performance
- rubocop-rspec
- rubocop-capybara
AllCops:
NewCops: enable
UseCache: true
CacheRootDirectory: src/api/tmp/rubocop_cache_root_dir
MaxFilesInCache: 2000
Exclude:
- 'src/api/**/*'
- 'docs/api/restility/**/*'
- 'src/backend/**/*'
# These files are RPM spec files
- 'dist/*.spec'
- 'dist/t/spec/fixtures/hello_world.spec'
SuggestExtensions:
# We don't want extra cops for minitest since we want to migrate those tests to RSpec
rubocop-minitest: false
# We lint our rails code with the setup in src/api/.rubocop.yml
rubocop-rails: false
# We don't use factories in dist/t/spec
rubocop-factory_bot: false
#################### Layout ###########################
Layout/HashAlignment:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
EnforcedLastArgumentHashStyle: ignore_implicit
# We decide disable this cop because we can't reach an agreement
Layout/DotPosition:
Enabled: false
Layout/EndAlignment:
EnforcedStyleAlignWith: variable
#################### Style ###########################
Style/Alias:
EnforcedStyle: 'prefer_alias_method'
Style/CommandLiteral:
EnforcedStyle: percent_x
Style/Documentation:
Enabled: false
# Using an empty case is sometimes clearer than `if/elsif/elsif/else`
Style/EmptyCaseCondition:
Enabled: false
Style/RedundantReturn:
Enabled: false
Style/SymbolArray:
EnforcedStyle: brackets
Style/WordArray:
EnforcedStyle: brackets
# At the moment, the default configuration of the previous cops are pending
# and, the autocorrect are unsafe. So for now, we will disable them.
Style/HashEachMethods:
Enabled: false
Style/HashTransformKeys:
Enabled: false
Style/HashTransformValues:
Enabled: false
Style/HashSyntax:
EnforcedShorthandSyntax: either
# We agreed on disabling this cop since it's often a sign of a code smell when we need to use `something&.my_method`
Style/SafeNavigation:
Enabled: false
##################### Metrics ##################################
Metrics/ClassLength:
Severity: refactor
Layout/LineLength:
Max: 150
Metrics/ModuleLength:
Severity: refactor