forked from okuramasafumi/alba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
88 lines (69 loc) · 1.83 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
---
inherit_gem:
rubocop-sensible: 'config/rubocop.yml'
require:
- rubocop-minitest
- rubocop-performance
- rubocop-rake
AllCops:
Exclude:
- 'Rakefile'
- 'alba.gemspec'
- 'benchmark/**/*.rb'
- 'script/**/*.rb'
NewCops: enable
EnabledByDefault: true
TargetRubyVersion: 2.5
# Items in Gemfile is dev dependencies and we don't have to specify versions.
Bundler/GemVersion:
Enabled: false
# We'd like to write something like:
# assert_equal(
# expected,
# actual
# )
Layout/RedundantLineBreak:
Exclude:
- 'test/**/*'
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
Layout/MultilineAssignmentLayout:
EnforcedStyle: same_line
Lint/ConstantResolution:
Enabled: false
# In test code we don't care about the metrics!
Metrics:
Exclude:
- 'test/**/*.rb'
# `Resource` module is a core module and its length tends to be long...
Metrics/ModuleLength:
Exclude:
- 'lib/alba/resource.rb'
# Resource class includes DSLs, which tend to accept long list of parameters
Metrics/ParameterLists:
Exclude:
- 'test/**/*.rb'
# We need to eval resource code to test errors on resource classes
Security/Eval:
Exclude:
- 'test/**/*.rb'
Style/ConstantVisibility:
Exclude:
- 'lib/alba/version.rb'
Style/Copyright:
Enabled: false
# I know what I do :)
Style/DisableCopsWithinSourceCodeDirective:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/InlineComment:
Enabled: false
Style/MethodCallWithArgsParentheses:
IgnoredMethods: ['require', 'require_relative', 'include', 'extend', 'puts', 'p', 'warn', 'raise', 'send', 'public_send']
Exclude:
# There are so many `attributes` call without parenthese and that's absolutely fine
- 'test/**/*.rb'
# There are so many cases we just want `if` expression!
Style/MissingElse:
EnforcedStyle: case