-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdojo.py
82 lines (82 loc) · 3.05 KB
/
dojo.py
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
import os
config = {
'commit-msg': {
'hook': 'commitMsg',
'keywords': [
'add parameter',
'change bidirectional association to unidirectional',
'change reference to value',
'change unidirectional association to bidirectional',
'change value to reference',
'collapse hierarchy',
'consolidate conditional expression',
'consolidate duplicate conditional fragments',
'convert procedural design to objects',
'decompose conditional',
'duplicate observed data',
'encapsulate collection',
'encapsulate downcast',
'encapsulate field',
'extract class',
'extract hierarchy',
'extract interface',
'extract method',
'extract subclass',
'extract superclass',
'form template method',
'hide delegate',
'hide method',
'inline class',
'inline method',
'inline temp',
'introduce assertion',
'introduce explaining variable',
'introduce foreign method',
'introduce local extension',
'introduce null object',
'introduce parameter object',
'move field',
'move method',
'parameterize method',
'preserve whole object',
'pull up constructor body',
'pull up field',
'pull up method',
'push down field',
'push down method',
'remove assignments to parameters',
'remove control flag',
'remove middle man',
'remove parameter',
'remove setting method',
'rename method',
'replace array with object',
'replace conditional with polymorphism',
'replace constructor with factory method',
'replace data value with object',
'replace delegation with inheritance',
'replace error code with exception',
'replace exception with test',
'replace inheritance with delegation',
'replace magic number with symbolic constant',
'replace method with method object',
'replace nested conditional with guard clauses',
'replace parameter with explicit methods',
'replace parameter with method',
'replace record with data class',
'replace subclass with fields',
'replace temp with query',
'replace type code with class',
'replace type code with state',
'replace type code with strategy',
'replace type code with subclasses',
'self encapsulate field',
'seperate domain from presentation',
'seperate query from modifier',
'split temporary variable',
'substitute algorithm',
'tease apart inheritance',
],
'score': os.path.join(os.path.dirname(__file__), 'score.txt')
}
}