-
Notifications
You must be signed in to change notification settings - Fork 4
/
.rubocop.yml
116 lines (86 loc) · 2.15 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
AllCops:
TargetRubyVersion: 2.6
TargetRailsVersion: 5.2
Exclude:
- '**/vendor/**/*'
- '**/tmp/**/*'
- '**/bin/**/*'
- '**/plugins/**/*'
- '**/extra/**/*'
- '**/lib/generators/**/templates/*'
- '**/lib/tasks/**/*'
- '**/files/**/*'
- 'db/schema.rb'
# Enable extensions
require:
- rubocop-performance
- rubocop-rails
# Rules for Redmine
Lint/SendWithMixinArgument:
Enabled: false
Style/SymbolArray:
Enabled: false
Rails/ApplicationRecord:
Enabled: false
Rails/CreateTableWithTimestamps:
Enabled: false
Rails/FilePath:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/ExpandPathArguments:
Enabled: false
Style/ClassVars:
Enabled: false
Bundler/OrderedGems:
Enabled: false
Rails/ReversibleMigration:
Enabled: false
Layout/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
Layout/SpaceBeforeBlockBraces:
# "space" is used more than "no_space".
# But "no_space" is more natural in one liner.
# str = path.to_s.split(%r{[/\\]}).select{|p| !p.blank?}.join("/")
Enabled: false
# You can see results by "rubocop --only Layout/SpaceInsideBlockBraces"
Layout/SpaceInsideBlockBraces:
EnforcedStyle: no_space
SpaceBeforeBlockParameters: false
# You can see results by "rubocop --only Layout/SpaceInsideHashLiteralBraces"
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
Layout/TrailingWhitespace:
AllowInHeredoc: true
Lint/SuppressedException:
AllowComments: true
Metrics:
Enabled: false
Naming/AccessorMethodName:
Enabled: false
Naming/BinaryOperatorParameterName:
Enabled: false
Naming/PredicateName:
Enabled: false
Rails/HelperInstanceVariable:
Enabled: false
Style/FormatStringToken:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: true
EnforcedStyle: always
Exclude:
- 'db/**/*.rb'
- 'Gemfile'
- 'Rakefile'
- 'config.ru'
- 'config/additional_environment.rb'
Style/HashSyntax:
Enabled: true
EnforcedStyle: no_mixed_keys
Style/IdenticalConditionalBranches:
Exclude:
- 'config/initializers/10-patches.rb'
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
Style/TrailingCommaInArrayLiteral:
Enabled: false