hashira 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +80 -0
- data/README.md +61 -6
- data/exe/hashira +1 -1
- data/lib/hashira/analysis/finding.rb +10 -0
- data/lib/hashira/analysis/type_walk.rb +4 -0
- data/lib/hashira/boundaries.rb +64 -0
- data/lib/hashira/ci/baseline.rb +26 -7
- data/lib/hashira/ci/comparison.rb +14 -5
- data/lib/hashira/ci/{edge_diff_report.rb → edge_changes.rb} +1 -1
- data/lib/hashira/ci/{finding_diff_report.rb → finding_changes.rb} +1 -1
- data/lib/hashira/ci/mark.rb +7 -0
- data/lib/hashira/ci/ratchet.rb +3 -1
- data/lib/hashira/ci/ratchet_report.rb +2 -2
- data/lib/hashira/ci/slice.rb +7 -3
- data/lib/hashira/ci/sweep.rb +1 -1
- data/lib/hashira/cli/flag.rb +1 -1
- data/lib/hashira/cli/flags.rb +1 -1
- data/lib/hashira/cli/options.rb +16 -6
- data/lib/hashira/cli/run.rb +1 -6
- data/lib/hashira/{cli.rb → cli/session.rb} +7 -5
- data/lib/hashira/coupling/{cycle_findings.rb → cycle.rb} +1 -1
- data/lib/hashira/coupling/definitions.rb +1 -7
- data/lib/hashira/coupling/{roll_call_findings.rb → echo.rb} +1 -1
- data/lib/hashira/coupling/{sdp_violation_findings.rb → imbalance.rb} +3 -3
- data/lib/hashira/coupling/{mixed_audience_findings.rb → mixed_audience.rb} +1 -1
- data/lib/hashira/coupling/report.rb +5 -5
- data/lib/hashira/coupling/{wide_edge_findings.rb → wide_edge.rb} +1 -1
- data/lib/hashira/duplication/clusters.rb +1 -1
- data/lib/hashira/duplication/fragment.rb +18 -0
- data/lib/hashira/duplication/literal.rb +25 -0
- data/lib/hashira/duplication/variance.rb +7 -1
- data/lib/hashira/pipeline.rb +8 -1
- data/lib/hashira/project.rb +4 -1
- data/lib/hashira/report/smell_phrases.rb +5 -5
- data/lib/hashira/smells/{instance_variable_assumption.rb → assumed_state.rb} +5 -15
- data/lib/hashira/smells/boundary_sprawl.rb +3 -2
- data/lib/hashira/smells/branches.rb +62 -0
- data/lib/hashira/smells/census.rb +8 -2
- data/lib/hashira/smells/contexts.rb +3 -1
- data/lib/hashira/smells/lineage.rb +92 -0
- data/lib/hashira/smells/{duplicate_method_call.rb → repeated_call.rb} +25 -5
- data/lib/hashira/smells/report.rb +10 -7
- data/lib/hashira/smells/{too_many_instance_variables.rb → state_sprawl.rb} +1 -1
- data/lib/hashira/version.rb +1 -1
- data/lib/hashira.rb +19 -11
- metadata +17 -12
data/lib/hashira.rb
CHANGED
|
@@ -7,6 +7,9 @@ module Hashira
|
|
|
7
7
|
module CI
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
+
module CLI
|
|
11
|
+
end
|
|
12
|
+
|
|
10
13
|
module Coupling
|
|
11
14
|
end
|
|
12
15
|
|
|
@@ -39,17 +42,17 @@ require_relative "hashira/ci/accepted"
|
|
|
39
42
|
require_relative "hashira/ci/baseline"
|
|
40
43
|
require_relative "hashira/ci/comparison"
|
|
41
44
|
require_relative "hashira/ci/diff"
|
|
42
|
-
require_relative "hashira/ci/
|
|
43
|
-
require_relative "hashira/ci/
|
|
45
|
+
require_relative "hashira/ci/edge_changes"
|
|
46
|
+
require_relative "hashira/ci/finding_changes"
|
|
44
47
|
require_relative "hashira/ci/gate"
|
|
45
48
|
require_relative "hashira/ci/improvement"
|
|
49
|
+
require_relative "hashira/ci/mark"
|
|
46
50
|
require_relative "hashira/ci/ratchet"
|
|
47
51
|
require_relative "hashira/ci/ratchet_report"
|
|
48
52
|
require_relative "hashira/ci/scope"
|
|
49
53
|
require_relative "hashira/ci/slice"
|
|
50
54
|
require_relative "hashira/ci/status"
|
|
51
55
|
require_relative "hashira/ci/sweep"
|
|
52
|
-
require_relative "hashira/cli"
|
|
53
56
|
require_relative "hashira/cli/arguments"
|
|
54
57
|
require_relative "hashira/cli/choice"
|
|
55
58
|
require_relative "hashira/cli/command_line"
|
|
@@ -62,6 +65,7 @@ require_relative "hashira/cli/only"
|
|
|
62
65
|
require_relative "hashira/cli/options"
|
|
63
66
|
require_relative "hashira/cli/package_by"
|
|
64
67
|
require_relative "hashira/cli/run"
|
|
68
|
+
require_relative "hashira/cli/session"
|
|
65
69
|
require_relative "hashira/cli/skip"
|
|
66
70
|
require_relative "hashira/cli/usage"
|
|
67
71
|
require_relative "hashira/complexity/boolean_run"
|
|
@@ -76,7 +80,7 @@ require_relative "hashira/coupling/audiences"
|
|
|
76
80
|
require_relative "hashira/coupling/catalog"
|
|
77
81
|
require_relative "hashira/coupling/census"
|
|
78
82
|
require_relative "hashira/coupling/constant_registry"
|
|
79
|
-
require_relative "hashira/coupling/
|
|
83
|
+
require_relative "hashira/coupling/cycle"
|
|
80
84
|
require_relative "hashira/coupling/cycle_search"
|
|
81
85
|
require_relative "hashira/coupling/cycles"
|
|
82
86
|
require_relative "hashira/coupling/definition"
|
|
@@ -87,7 +91,7 @@ require_relative "hashira/coupling/folder_placement"
|
|
|
87
91
|
require_relative "hashira/coupling/folding"
|
|
88
92
|
require_relative "hashira/coupling/graph"
|
|
89
93
|
require_relative "hashira/coupling/metric"
|
|
90
|
-
require_relative "hashira/coupling/
|
|
94
|
+
require_relative "hashira/coupling/mixed_audience"
|
|
91
95
|
require_relative "hashira/coupling/namespace_placement"
|
|
92
96
|
require_relative "hashira/coupling/namespace_prefix"
|
|
93
97
|
require_relative "hashira/coupling/naming"
|
|
@@ -96,13 +100,13 @@ require_relative "hashira/coupling/placement"
|
|
|
96
100
|
require_relative "hashira/coupling/references"
|
|
97
101
|
require_relative "hashira/coupling/report"
|
|
98
102
|
require_relative "hashira/coupling/roll_call"
|
|
99
|
-
require_relative "hashira/coupling/
|
|
103
|
+
require_relative "hashira/coupling/echo"
|
|
100
104
|
require_relative "hashira/coupling/roster"
|
|
101
105
|
require_relative "hashira/coupling/rule"
|
|
102
106
|
require_relative "hashira/coupling/scope"
|
|
103
107
|
require_relative "hashira/coupling/sdp_check"
|
|
104
|
-
require_relative "hashira/coupling/
|
|
105
|
-
require_relative "hashira/coupling/
|
|
108
|
+
require_relative "hashira/coupling/imbalance"
|
|
109
|
+
require_relative "hashira/coupling/wide_edge"
|
|
106
110
|
require_relative "hashira/coupling/words"
|
|
107
111
|
require_relative "hashira/diagram/dot"
|
|
108
112
|
require_relative "hashira/diagram/mermaid"
|
|
@@ -116,6 +120,7 @@ require_relative "hashira/duplication/fragment"
|
|
|
116
120
|
require_relative "hashira/duplication/grouping"
|
|
117
121
|
require_relative "hashira/duplication/harvest"
|
|
118
122
|
require_relative "hashira/duplication/index"
|
|
123
|
+
require_relative "hashira/duplication/literal"
|
|
119
124
|
require_relative "hashira/duplication/maximal"
|
|
120
125
|
require_relative "hashira/duplication/near_miss"
|
|
121
126
|
require_relative "hashira/duplication/sequence"
|
|
@@ -123,6 +128,7 @@ require_relative "hashira/duplication/similarity"
|
|
|
123
128
|
require_relative "hashira/duplication/union_find"
|
|
124
129
|
require_relative "hashira/duplication/variance"
|
|
125
130
|
require_relative "hashira/error"
|
|
131
|
+
require_relative "hashira/boundaries"
|
|
126
132
|
require_relative "hashira/focus"
|
|
127
133
|
require_relative "hashira/hotspots/file_cost"
|
|
128
134
|
require_relative "hashira/hotspots/rollup"
|
|
@@ -141,6 +147,7 @@ require_relative "hashira/report/phrases"
|
|
|
141
147
|
require_relative "hashira/report/smell_phrases"
|
|
142
148
|
require_relative "hashira/report/text"
|
|
143
149
|
require_relative "hashira/report/view"
|
|
150
|
+
require_relative "hashira/smells/branches"
|
|
144
151
|
require_relative "hashira/smells/census"
|
|
145
152
|
require_relative "hashira/smells/check"
|
|
146
153
|
require_relative "hashira/smells/kind"
|
|
@@ -148,9 +155,10 @@ require_relative "hashira/smells/conditions"
|
|
|
148
155
|
require_relative "hashira/smells/contexts"
|
|
149
156
|
require_relative "hashira/smells/control_parameter"
|
|
150
157
|
require_relative "hashira/smells/data_clump"
|
|
151
|
-
require_relative "hashira/smells/
|
|
158
|
+
require_relative "hashira/smells/repeated_call"
|
|
152
159
|
require_relative "hashira/smells/feature_envy"
|
|
153
|
-
require_relative "hashira/smells/
|
|
160
|
+
require_relative "hashira/smells/assumed_state"
|
|
161
|
+
require_relative "hashira/smells/lineage"
|
|
154
162
|
require_relative "hashira/smells/manual_dispatch"
|
|
155
163
|
require_relative "hashira/smells/module_initialize"
|
|
156
164
|
require_relative "hashira/smells/nil_check"
|
|
@@ -159,7 +167,7 @@ require_relative "hashira/smells/refs"
|
|
|
159
167
|
require_relative "hashira/smells/repeated_conditional"
|
|
160
168
|
require_relative "hashira/smells/report"
|
|
161
169
|
require_relative "hashira/smells/scope"
|
|
162
|
-
require_relative "hashira/smells/
|
|
170
|
+
require_relative "hashira/smells/state_sprawl"
|
|
163
171
|
require_relative "hashira/smells/utility_function"
|
|
164
172
|
require_relative "hashira/smells/visibility"
|
|
165
173
|
require_relative "hashira/trees"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hashira
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Giacomo GK
|
|
@@ -30,22 +30,23 @@ files:
|
|
|
30
30
|
- lib/hashira/analysis/node_walk.rb
|
|
31
31
|
- lib/hashira/analysis/syntax.rb
|
|
32
32
|
- lib/hashira/analysis/type_walk.rb
|
|
33
|
+
- lib/hashira/boundaries.rb
|
|
33
34
|
- lib/hashira/churn.rb
|
|
34
35
|
- lib/hashira/ci/accepted.rb
|
|
35
36
|
- lib/hashira/ci/baseline.rb
|
|
36
37
|
- lib/hashira/ci/comparison.rb
|
|
37
38
|
- lib/hashira/ci/diff.rb
|
|
38
|
-
- lib/hashira/ci/
|
|
39
|
-
- lib/hashira/ci/
|
|
39
|
+
- lib/hashira/ci/edge_changes.rb
|
|
40
|
+
- lib/hashira/ci/finding_changes.rb
|
|
40
41
|
- lib/hashira/ci/gate.rb
|
|
41
42
|
- lib/hashira/ci/improvement.rb
|
|
43
|
+
- lib/hashira/ci/mark.rb
|
|
42
44
|
- lib/hashira/ci/ratchet.rb
|
|
43
45
|
- lib/hashira/ci/ratchet_report.rb
|
|
44
46
|
- lib/hashira/ci/scope.rb
|
|
45
47
|
- lib/hashira/ci/slice.rb
|
|
46
48
|
- lib/hashira/ci/status.rb
|
|
47
49
|
- lib/hashira/ci/sweep.rb
|
|
48
|
-
- lib/hashira/cli.rb
|
|
49
50
|
- lib/hashira/cli/arguments.rb
|
|
50
51
|
- lib/hashira/cli/choice.rb
|
|
51
52
|
- lib/hashira/cli/command_line.rb
|
|
@@ -58,6 +59,7 @@ files:
|
|
|
58
59
|
- lib/hashira/cli/options.rb
|
|
59
60
|
- lib/hashira/cli/package_by.rb
|
|
60
61
|
- lib/hashira/cli/run.rb
|
|
62
|
+
- lib/hashira/cli/session.rb
|
|
61
63
|
- lib/hashira/cli/skip.rb
|
|
62
64
|
- lib/hashira/cli/top.rb
|
|
63
65
|
- lib/hashira/cli/usage.rb
|
|
@@ -73,18 +75,20 @@ files:
|
|
|
73
75
|
- lib/hashira/coupling/catalog.rb
|
|
74
76
|
- lib/hashira/coupling/census.rb
|
|
75
77
|
- lib/hashira/coupling/constant_registry.rb
|
|
76
|
-
- lib/hashira/coupling/
|
|
78
|
+
- lib/hashira/coupling/cycle.rb
|
|
77
79
|
- lib/hashira/coupling/cycle_search.rb
|
|
78
80
|
- lib/hashira/coupling/cycles.rb
|
|
79
81
|
- lib/hashira/coupling/definition.rb
|
|
80
82
|
- lib/hashira/coupling/definitions.rb
|
|
83
|
+
- lib/hashira/coupling/echo.rb
|
|
81
84
|
- lib/hashira/coupling/edge.rb
|
|
82
85
|
- lib/hashira/coupling/edge_map.rb
|
|
83
86
|
- lib/hashira/coupling/folder_placement.rb
|
|
84
87
|
- lib/hashira/coupling/folding.rb
|
|
85
88
|
- lib/hashira/coupling/graph.rb
|
|
89
|
+
- lib/hashira/coupling/imbalance.rb
|
|
86
90
|
- lib/hashira/coupling/metric.rb
|
|
87
|
-
- lib/hashira/coupling/
|
|
91
|
+
- lib/hashira/coupling/mixed_audience.rb
|
|
88
92
|
- lib/hashira/coupling/namespace_placement.rb
|
|
89
93
|
- lib/hashira/coupling/namespace_prefix.rb
|
|
90
94
|
- lib/hashira/coupling/naming.rb
|
|
@@ -93,13 +97,11 @@ files:
|
|
|
93
97
|
- lib/hashira/coupling/references.rb
|
|
94
98
|
- lib/hashira/coupling/report.rb
|
|
95
99
|
- lib/hashira/coupling/roll_call.rb
|
|
96
|
-
- lib/hashira/coupling/roll_call_findings.rb
|
|
97
100
|
- lib/hashira/coupling/roster.rb
|
|
98
101
|
- lib/hashira/coupling/rule.rb
|
|
99
102
|
- lib/hashira/coupling/scope.rb
|
|
100
103
|
- lib/hashira/coupling/sdp_check.rb
|
|
101
|
-
- lib/hashira/coupling/
|
|
102
|
-
- lib/hashira/coupling/wide_edge_findings.rb
|
|
104
|
+
- lib/hashira/coupling/wide_edge.rb
|
|
103
105
|
- lib/hashira/coupling/words.rb
|
|
104
106
|
- lib/hashira/diagram/dot.rb
|
|
105
107
|
- lib/hashira/diagram/mermaid.rb
|
|
@@ -113,6 +115,7 @@ files:
|
|
|
113
115
|
- lib/hashira/duplication/grouping.rb
|
|
114
116
|
- lib/hashira/duplication/harvest.rb
|
|
115
117
|
- lib/hashira/duplication/index.rb
|
|
118
|
+
- lib/hashira/duplication/literal.rb
|
|
116
119
|
- lib/hashira/duplication/maximal.rb
|
|
117
120
|
- lib/hashira/duplication/near_miss.rb
|
|
118
121
|
- lib/hashira/duplication/sequence.rb
|
|
@@ -139,28 +142,30 @@ files:
|
|
|
139
142
|
- lib/hashira/report/smell_phrases.rb
|
|
140
143
|
- lib/hashira/report/text.rb
|
|
141
144
|
- lib/hashira/report/view.rb
|
|
145
|
+
- lib/hashira/smells/assumed_state.rb
|
|
142
146
|
- lib/hashira/smells/boundary_sprawl.rb
|
|
147
|
+
- lib/hashira/smells/branches.rb
|
|
143
148
|
- lib/hashira/smells/census.rb
|
|
144
149
|
- lib/hashira/smells/check.rb
|
|
145
150
|
- lib/hashira/smells/conditions.rb
|
|
146
151
|
- lib/hashira/smells/contexts.rb
|
|
147
152
|
- lib/hashira/smells/control_parameter.rb
|
|
148
153
|
- lib/hashira/smells/data_clump.rb
|
|
149
|
-
- lib/hashira/smells/duplicate_method_call.rb
|
|
150
154
|
- lib/hashira/smells/feature_envy.rb
|
|
151
155
|
- lib/hashira/smells/foreign.rb
|
|
152
|
-
- lib/hashira/smells/instance_variable_assumption.rb
|
|
153
156
|
- lib/hashira/smells/kind.rb
|
|
157
|
+
- lib/hashira/smells/lineage.rb
|
|
154
158
|
- lib/hashira/smells/manual_dispatch.rb
|
|
155
159
|
- lib/hashira/smells/module_initialize.rb
|
|
156
160
|
- lib/hashira/smells/nil_check.rb
|
|
157
161
|
- lib/hashira/smells/ownership.rb
|
|
158
162
|
- lib/hashira/smells/param_check.rb
|
|
159
163
|
- lib/hashira/smells/refs.rb
|
|
164
|
+
- lib/hashira/smells/repeated_call.rb
|
|
160
165
|
- lib/hashira/smells/repeated_conditional.rb
|
|
161
166
|
- lib/hashira/smells/report.rb
|
|
162
167
|
- lib/hashira/smells/scope.rb
|
|
163
|
-
- lib/hashira/smells/
|
|
168
|
+
- lib/hashira/smells/state_sprawl.rb
|
|
164
169
|
- lib/hashira/smells/utility_function.rb
|
|
165
170
|
- lib/hashira/smells/visibility.rb
|
|
166
171
|
- lib/hashira/trees.rb
|