decode 0.21.0 → 0.21.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 745a2d58b25edbffce374091e5ea4fb81eb9473d2e0de28353e96835a1bfb24b
4
- data.tar.gz: e7b5b0ba014dad20f2df889d981a3431920f90908381dbdd697610a0a036171f
3
+ metadata.gz: f7558d10e649a1fd354ad0b411643dc303342b99320ea53ca4cc8aab003ee6cd
4
+ data.tar.gz: 5102ed855db41a639b36c1f3a6d1c5fff0ff505527bc137580d64ec7ddffcf02
5
5
  SHA512:
6
- metadata.gz: 1125299d2e5f2ff38f1192622ff28f9d9da3228d1f2c2f493b7aba5920f767962e81e9a538efa6c6387e87e79ad3f276d95cd9c68edb607c8e772978b1c3209a
7
- data.tar.gz: 1f87468afd6db7116947c82e2ca16ac111e2faa4ace6b945f83b87bcf47aa9743b0e830c2ea26d1024909d5daf437f00773381de8cf86a9c2acf82f3cfa8db37
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
- missing = []
18
- public_count = 0
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
- documented_count += 1
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
@@ -98,7 +98,7 @@ module Decode
98
98
  node, nested_name_for(node.children[0]),
99
99
  comments: extract_comments_for(node, comments),
100
100
  parent: parent,
101
- language: @language
101
+ language: @language, visibility: :public
102
102
  )
103
103
 
104
104
  assign_definition(parent, definition)
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2020-2022, by Samuel Williams.
5
5
 
6
6
  module Decode
7
- VERSION = "0.21.0"
7
+ VERSION = "0.21.2"
8
8
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.21.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file