-
Notifications
You must be signed in to change notification settings - Fork 330
/
.rubocop.yml
124 lines (97 loc) · 2.37 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
require:
- rubocop-performance
- rubocop-rails
- rubocop-erb
inherit_from: .rubocop_todo.yml
AllCops:
TargetRubyVersion: 3.0
NewCops: enable
Exclude:
- 'gemfiles/Gemfile*.lock'
- 'bin/*'
- 'lib/generators/**/templates/**/*'
- 'vendor/bundle/**/*'
- 'test/mock_app/**/*'
# we allow long lines yet, because there are many to fix, and it would enforce to create long lines
Style/IfUnlessModifier:
Enabled: false
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented_relative_to_receiver
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
Layout/HashAlignment:
EnforcedHashRocketStyle:
- key
- table
EnforcedColonStyle:
- key
- table
Lint/UnusedMethodArgument:
Enabled: false
Metrics/ClassLength:
Max: 500
CountComments: false
Layout/LineLength:
Exclude:
- 'test/**/*'
Metrics/CyclomaticComplexity:
Exclude:
- test/**/*
# TODO: cleanup the next files
- lib/active_scaffold/helpers/*
- lib/active_scaffold/extensions/*
- lib/active_scaffold/bridges/**/*
- lib/active_scaffold/config/*
- lib/active_scaffold/data_structures/*
- lib/active_scaffold/actions/core.rb
- lib/active_scaffold/finder.rb
- lib/active_scaffold/constraints.rb
- lib/active_scaffold/active_record_permissions.rb
- lib/active_scaffold/core.rb
- lib/active_scaffold/tableless.rb
Metrics/ModuleLength:
Max: 700
CountComments: false
Metrics/ParameterLists:
CountKeywordArgs: false
Naming/FileName:
Exclude:
- Gemfile
- Rakefile
- test/mock_app/Rakefile
- vendor/assets/stylesheets/jquery-ui-theme.css.erb
Naming/MemoizedInstanceVariableName:
EnforcedStyleForLeadingUnderscores: optional
Naming/VariableNumber:
CheckSymbols: false
Performance/RedundantMerge:
MaxKeyValuePairs: 1
Rails:
Enabled: true
Rails/ApplicationRecord:
Exclude:
- 'test/**/*'
Rails/DynamicFindBy:
Whitelist:
- find_by_name
- find_by_names
Rails/RakeEnvironment:
Exclude:
- lib/tasks/brakeman.rake
Rails/ActionControllerTestCase:
Enabled: false
Style/FormatString:
EnforcedStyle: percent
Style/FrozenStringLiteralComment:
Enabled: false
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
Style/SingleLineBlockParams:
Enabled: false
Style/SingleLineMethods:
Exclude:
- 'test/**/*'