Class: RubyLsp::CheckDocs

Inherits:
Rake::TaskLib
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/ruby_lsp/check_docs.rb

Overview

This rake task checks that all requests or extensions are fully documented. Add the rake task to your Rakefile and specify the absolute path for all files that must be required in order to discover all listeners and their related GIFs

# Rakefile
request_files = FileList.new("#{__dir__}/lib/ruby_lsp/requests/*.rb") do |fl|
  fl.exclude(/base_request\.rb/)
end
gif_files = FileList.new("#{__dir__}/**/*.gif")
RubyLsp::CheckDocs.new(request_files, gif_files)
# Run with bundle exec rake ruby_lsp:check_docs

Instance Method Summary collapse

Constructor Details

#initialize(require_files, gif_files) ⇒ CheckDocs

Returns a new instance of CheckDocs.



23
24
25
26
27
28
29
30
# File 'lib/ruby_lsp/check_docs.rb', line 23

def initialize(require_files, gif_files)
  super()

  @name = T.let("ruby_lsp:check_docs", String)
  @file_list = require_files
  @gif_list = gif_files
  define_task
end