decode 0.21.0 → 0.21.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/bake/decode/index.rb +9 -5
- data/lib/decode/language/ruby/parser.rb +1 -1
- data/lib/decode/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: f7558d10e649a1fd354ad0b411643dc303342b99320ea53ca4cc8aab003ee6cd
|
4
|
+
data.tar.gz: 5102ed855db41a639b36c1f3a6d1c5fff0ff505527bc137580d64ec7ddffcf02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eed9aa58656ce12fd46efaad0de9d64c0f78abcc4b61c9f7d88db8cb316dcdce1d334af5241317dd18e1294c89c72ff040fbe799edae826db2a007b48dba04b6
|
7
|
+
data.tar.gz: 10b5f6232f533af57cdb04c256b3322094bb45e6fa64c05add9b95e30bce3fc0f7c89e00e45c60f1a4e0f2dd673f7dab0ead15b700c1035cdf81f2851ce25b9b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/bake/decode/index.rb
CHANGED
@@ -8,28 +8,27 @@
|
|
8
8
|
def coverage(root)
|
9
9
|
require 'build/files/glob'
|
10
10
|
require 'decode/index'
|
11
|
+
require 'set'
|
11
12
|
|
12
13
|
paths = Build::Files::Path.expand(root).glob("**/*")
|
13
14
|
|
14
15
|
index = Decode::Index.new
|
15
16
|
index.update(paths)
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
documented_count = 0
|
18
|
+
documented = Set.new
|
19
|
+
missing = Set.new
|
20
20
|
|
21
21
|
index.trie.traverse do |path, node, descend|
|
22
22
|
public_definition = node.values.nil?
|
23
23
|
|
24
24
|
node.values&.each do |definition|
|
25
25
|
if definition.public?
|
26
|
-
public_count += 1
|
27
26
|
level = path.size
|
28
27
|
|
29
28
|
if definition.comments.nil?
|
30
29
|
missing << definition.qualified_name
|
31
30
|
else
|
32
|
-
|
31
|
+
documented << definition.qualified_name
|
33
32
|
end
|
34
33
|
|
35
34
|
public_definition = true
|
@@ -42,6 +41,11 @@ def coverage(root)
|
|
42
41
|
end
|
43
42
|
end
|
44
43
|
|
44
|
+
# Since there can be multiple definitions for a given symbol, we can ignore any missing definitions that have been documented elsewhere:
|
45
|
+
missing = missing - documented
|
46
|
+
|
47
|
+
documented_count = documented.size
|
48
|
+
public_count = documented_count + missing.size
|
45
49
|
$stderr.puts "#{documented_count} definitions have documentation, out of #{public_count} public definitions."
|
46
50
|
|
47
51
|
if documented_count < public_count
|
data/lib/decode/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|