forked from espoo-dev/rails_boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.reek.yml
90 lines (84 loc) · 2.34 KB
/
.reek.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
---
### Generic smell configuration
detectors:
# You can disable smells completely
IrresponsibleModule:
enabled: false
# You can use filters to silence Reek warnings.
# Either because you simply disagree with Reek (we are not the police) or
# because you want to fix this at a later point in time.
UncommunicativeModuleName:
accept:
- V1
NestedIterators:
exclude:
- "MyWorker#self.class_method" # should be refactored
- "AnotherWorker#instance_method" # should be refactored as well
TooManyStatements:
exclude:
- "Users::SessionsController#create"
- "Seeds"
max_statements: 6
TooManyMethods:
exclude:
- "Seeds"
InstanceVariableAssumption:
exclude:
- "Seeds"
TooManyInstanceVariables:
exclude:
- "Seeds"
DuplicateMethodCall:
max_calls: 2
# A lot of smells allow fine tuning their configuration. You can look up all available options
# in the corresponding smell documentation in /docs. In most cases you probably can just go
# with the defaults as documented in defaults.reek.yml.
DataClump:
max_copies: 3
min_clump_size: 3
FeatureEnvy:
enabled: false
### Directory specific configuration
# You can configure smells on a per-directory base.
# E.g. the classic Rails case: controllers smell of NestedIterators (see /docs/Nested-Iterators.md) and
# helpers smell of UtilityFunction (see docs/Utility-Function.md)
#
# Note that we only allow configuration on a directory level, not a file level,
# so all paths have to point to directories.
# A Dir.glob pattern can be used.
directories:
"app/":
UtilityFunction:
enabled: false
"app/controllers":
IrresponsibleModule:
enabled: false
NestedIterators:
max_allowed_nesting: 2
UnusedPrivateMethod:
enabled: false
InstanceVariableAssumption:
enabled: false
UtilityFunction:
enabled: false
"app/helpers":
IrresponsibleModule:
enabled: false
UtilityFunction:
enabled: false
"app/mailers":
InstanceVariableAssumption:
enabled: false
"app/models":
InstanceVariableAssumption:
enabled: false
Attribute:
enabled: false
### Excluding directories
# Directories and files below will not be scanned at all
exclude_paths:
- lib/
- bin/
- vendor/
- db/migrate
- app/controllers/graphql_controller.rb