ChillerDragon / teeworlds_network

A teeworlds 0.7 network protocol library written in ruby
5 stars 0 forks source link

Pick a doc comment system and stick to it #21

Closed ChillerDragon closed 5 months ago

ChillerDragon commented 5 months ago

In javascript land jsdoc basically can replace typescript. Because there is good tooling around it.

What is that in ruby? Which has the best editor integration? But running type checks in the CI would be even more important.

As far as I can see there is https://github.com/ruby/rdoc and https://yardoc.org/ not sure which one is more maintained and more widely used.

Note that YARD is mostly backwards-compatible with RDoc, at least as far as the markup is concerned. (RDoc plugins OTOH don't work with YARD.) So, you can actually use YARD to process your legacy RDoc files. YARD is mostly a proper superset of RDoc.

https://stackoverflow.com/a/3699807/6287070

The Ruby core library and standard library RDoc comments sometimes use an informal one. YARD has type annotations, but no type language.

https://stackoverflow.com/a/64303056/6287070

ChillerDragon commented 5 months ago

Running ri "FileUtils" prints some nice docs on my machine.

They are defined here https://github.com/ruby/fileutils/blob/master/lib/fileutils.rb

Whatever the standard ruby lib uses must be good. Having that for teeworlds_network would be nice for lib users.

ChillerDragon commented 5 months ago

Okay whatever yard it is:

ChillerDragon commented 5 months ago
gem install yard
yard

produced this

image

That could replace the whole markdown docs. Do we want that? I liked the markdown docs.

ChillerDragon commented 5 months ago

Whatever the standard ruby lib uses must be good. Having that for teeworlds_network would be nice for lib users.

We already have that lol

gem install teeworlds_network
ri "NetBase"

image