pronto-rustcov 0.1.3 → 0.1.4
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/lib/pronto/rustcov.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63740536f0a7afad0d8d7072898fb5c90ffe7d73902cb234a6e6058c1733e221
|
4
|
+
data.tar.gz: acafff7d282c63394f8f4d0424ba14e3999cd23097da1d5443460e5b26d5310d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66878eaab3af2cda55d7c6d74d569e5aaa8f9ddb21e9eca532eabb11248f6e737698f7ecbf872681849941908c450e7233ac704e949fb1578e3b4ae386818c7f
|
7
|
+
data.tar.gz: 2620f0434925e9b940ccb60fc8bea6ade2ba074980f78c90e45f3f8135bc6c7d3f3dd7eb4a0141e91dfa7ec3c4cd438339cd0ed3c701a8f1416fceefac1a8262
|
data/lib/pronto/rustcov.rb
CHANGED
@@ -10,6 +10,10 @@ module Pronto
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
+
def messages_limit
|
14
|
+
ENV['PRONTO_RUSTCOV_MESSAGES_LIMIT']&.to_i || 10
|
15
|
+
end
|
16
|
+
|
13
17
|
def one_message_per_file_markdown(lcov_path, base_url)
|
14
18
|
base_url = base_url.delete_suffix('/')
|
15
19
|
|
@@ -19,7 +23,7 @@ module Pronto
|
|
19
23
|
|
20
24
|
grouped = Hash.new { |h, k| h[k] = [] }
|
21
25
|
|
22
|
-
@patches.each do |patch|
|
26
|
+
@patches.sort_by { |patch| -patch.added_lines.count }.take(messages_limit).each do |patch|
|
23
27
|
next unless patch.added_lines.any?
|
24
28
|
file_path = patch.new_file_full_path.to_s
|
25
29
|
uncovered = lcov[file_path]
|
@@ -60,7 +64,7 @@ module Pronto
|
|
60
64
|
|
61
65
|
grouped = Hash.new { |h, k| h[k] = [] }
|
62
66
|
|
63
|
-
@patches.each do |patch|
|
67
|
+
@patches.sort_by { |patch| -patch.added_lines.count }.take(messages_limit).each do |patch|
|
64
68
|
next unless patch.added_lines.any?
|
65
69
|
file_path = patch.new_file_full_path.to_s
|
66
70
|
uncovered = lcov[file_path]
|