Skip to content

Commit

Permalink
Add RDoc coverage task
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Dec 16, 2023
1 parent 63dbeee commit 4346058
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/coverage/
/doc/
/html/
/pkg/
/tmp/
Expand Down
10 changes: 10 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,13 @@ task :default => :test
task "build" => "build:java"

task "build:java" => "date_epoch"

task "coverage" do
cov = []
e = IO.popen([FileUtils::RUBY, "-S", "rdoc", "-C"], &:read)
e.scan(/^ *# in file (?<loc>.*)\n *(?<code>.*)|^ *(?<code>.*\S) *# in file (?<loc>.*)/) do
cov << "%s: %s\n" % $~.values_at(:loc, :code)
end
cov.sort!
puts cov
end

0 comments on commit 4346058

Please sign in to comment.