simplecov-ai 0.10.1 → 0.10.2
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
- checksums.yaml.gz.sig +3 -4
- data/lib/simplecov-ai/markdown_builder.rb +19 -3
- data/lib/simplecov-ai/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b7ae5d956cdb6b5fd6529cbf793507984563b331ccaffeb710b7760f7e81a9da
|
|
4
|
+
data.tar.gz: eecad8ca18885972bd1b494f3706d1182c6fa0a3c42a1799ba4af27199e9f83f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e1a9a39532116181c40dc234f98364462fefd3f30a77ba88e7eebabeb4a222550e260b3d0571539ab6b3895221c56d37f38f8391173867ecd4f06672582d7ef
|
|
7
|
+
data.tar.gz: 44a0c37ed5fe8ef1e0df5b0ecbfc88ce3315b91a6dc33767751c042cf2ad8863756d46163f5fe25741a4a7a39d7802d7b2c60926f89ab5e57d1b7ab872d90be2
|
checksums.yaml.gz.sig
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
��
|
|
4
|
-
i�`���L�&>�5���F�d �g��i��� ���|��P�!i��_���w�|fl�n�Au�����R\b&7�P�����Y>�GSߗ��Ƣa�
|
|
1
|
+
C��Y�c���j�)��L��,��<X"�\VI��7zB���W�{.�
|
|
2
|
+
e���E�4U�"`D0T��L�?�/��m�\��\_=ˍ1��3���dzV�P�ĵ�o:ng|��!��V��%,�$��"�CJ�a���PU�����41�
|
|
3
|
+
��L�v8����z�6<�W�-�����W�
|
|
@@ -59,9 +59,11 @@ module SimpleCov
|
|
|
59
59
|
|
|
60
60
|
sig { void }
|
|
61
61
|
def write_deficits
|
|
62
|
+
files_enum = T.cast(@result.files, T::Enumerable[T.untyped])
|
|
63
|
+
files_array = T.let(files_enum.to_a, T::Array[SimpleCov::SourceFile])
|
|
62
64
|
# SCMD-REQ-014: Sort by coverage percent ASC, then by filename
|
|
63
65
|
files = T.let(
|
|
64
|
-
|
|
66
|
+
files_array.reject { |f| T.cast(f.covered_percent, Float) >= 100.0 }
|
|
65
67
|
.sort_by { |f| [T.cast(f.covered_percent, Float), T.cast(f.filename, String)] },
|
|
66
68
|
T::Array[SimpleCov::SourceFile]
|
|
67
69
|
)
|
|
@@ -99,7 +101,18 @@ module SimpleCov
|
|
|
99
101
|
@buffer.puts "- `#{node_name}`\n - **Line Deficit:** Unexecuted code."
|
|
100
102
|
end
|
|
101
103
|
|
|
102
|
-
if file.respond_to?(:branches)
|
|
104
|
+
process_branch_deficits(file, nodes) if file.respond_to?(:branches)
|
|
105
|
+
|
|
106
|
+
@buffer.puts ''
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
sig { params(file: SimpleCov::SourceFile, nodes: T::Array[ASTResolver::SemanticNode]).void }
|
|
110
|
+
def process_branch_deficits(file, nodes)
|
|
111
|
+
branches = file.branches
|
|
112
|
+
case branches
|
|
113
|
+
when Array
|
|
114
|
+
return unless branches.any?
|
|
115
|
+
|
|
103
116
|
T.cast(file.missed_branches, T::Array[SimpleCov::SourceFile::Branch]).each do |branch|
|
|
104
117
|
start_line = T.cast(branch.start_line, Integer)
|
|
105
118
|
end_line = T.cast(branch.end_line, Integer)
|
|
@@ -117,7 +130,10 @@ module SimpleCov
|
|
|
117
130
|
has_bypasses = T.let(false, T::Boolean)
|
|
118
131
|
bypass_buffer = T.let(StringIO.new, StringIO)
|
|
119
132
|
|
|
120
|
-
T.cast(@result.files
|
|
133
|
+
files_enum = T.cast(@result.files, T::Enumerable[T.untyped])
|
|
134
|
+
files_array = T.let(files_enum.to_a, T::Array[SimpleCov::SourceFile])
|
|
135
|
+
|
|
136
|
+
files_array.each do |file|
|
|
121
137
|
begin
|
|
122
138
|
nodes = ASTResolver.resolve(T.cast(file.filename, String))
|
|
123
139
|
rescue StandardError
|
data/lib/simplecov-ai/version.rb
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|