simplecov-ai 0.10.0 → 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 +0 -0
- data/lib/simplecov-ai/markdown_builder.rb +23 -5
- data/lib/simplecov-ai/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +15 -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
|
Binary file
|
|
@@ -59,15 +59,19 @@ module SimpleCov
|
|
|
59
59
|
|
|
60
60
|
sig { void }
|
|
61
61
|
def write_deficits
|
|
62
|
-
@
|
|
63
|
-
|
|
62
|
+
files_enum = T.cast(@result.files, T::Enumerable[T.untyped])
|
|
63
|
+
files_array = T.let(files_enum.to_a, T::Array[SimpleCov::SourceFile])
|
|
64
64
|
# SCMD-REQ-014: Sort by coverage percent ASC, then by filename
|
|
65
65
|
files = T.let(
|
|
66
|
-
|
|
66
|
+
files_array.reject { |f| T.cast(f.covered_percent, Float) >= 100.0 }
|
|
67
67
|
.sort_by { |f| [T.cast(f.covered_percent, Float), T.cast(f.filename, String)] },
|
|
68
68
|
T::Array[SimpleCov::SourceFile]
|
|
69
69
|
)
|
|
70
70
|
|
|
71
|
+
return if files.empty?
|
|
72
|
+
|
|
73
|
+
@buffer.puts "## Coverage Deficits\n\n"
|
|
74
|
+
|
|
71
75
|
files.each do |file|
|
|
72
76
|
# Check size limits SCMD-REQ-012
|
|
73
77
|
if @buffer.size / 1024.0 > @config.max_file_size_kb
|
|
@@ -97,7 +101,18 @@ module SimpleCov
|
|
|
97
101
|
@buffer.puts "- `#{node_name}`\n - **Line Deficit:** Unexecuted code."
|
|
98
102
|
end
|
|
99
103
|
|
|
100
|
-
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
|
+
|
|
101
116
|
T.cast(file.missed_branches, T::Array[SimpleCov::SourceFile::Branch]).each do |branch|
|
|
102
117
|
start_line = T.cast(branch.start_line, Integer)
|
|
103
118
|
end_line = T.cast(branch.end_line, Integer)
|
|
@@ -115,7 +130,10 @@ module SimpleCov
|
|
|
115
130
|
has_bypasses = T.let(false, T::Boolean)
|
|
116
131
|
bypass_buffer = T.let(StringIO.new, StringIO)
|
|
117
132
|
|
|
118
|
-
T.cast(@result.files, T::
|
|
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|
|
|
119
137
|
begin
|
|
120
138
|
nodes = ASTResolver.resolve(T.cast(file.filename, String))
|
|
121
139
|
rescue StandardError
|
data/lib/simplecov-ai/version.rb
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simplecov-ai
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.10.
|
|
4
|
+
version: 0.10.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vitalii Lazebnyi
|
|
@@ -259,6 +259,20 @@ dependencies:
|
|
|
259
259
|
- - ">="
|
|
260
260
|
- !ruby/object:Gem::Version
|
|
261
261
|
version: '0'
|
|
262
|
+
- !ruby/object:Gem::Dependency
|
|
263
|
+
name: simplecov-ai
|
|
264
|
+
requirement: !ruby/object:Gem::Requirement
|
|
265
|
+
requirements:
|
|
266
|
+
- - "~>"
|
|
267
|
+
- !ruby/object:Gem::Version
|
|
268
|
+
version: '0.10'
|
|
269
|
+
type: :development
|
|
270
|
+
prerelease: false
|
|
271
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
272
|
+
requirements:
|
|
273
|
+
- - "~>"
|
|
274
|
+
- !ruby/object:Gem::Version
|
|
275
|
+
version: '0.10'
|
|
262
276
|
description: Generates highly concise, deterministic Markdown coverage digests tailored
|
|
263
277
|
for LLMs and autonomous agents by matching coverage deficits to their AST semantic
|
|
264
278
|
boundaries rather than line numbers.
|
metadata.gz.sig
CHANGED
|
Binary file
|