Skip to content

Commit

Permalink
Remove unused documentation utilities (#2560)
Browse files Browse the repository at this point in the history
- We don't need the RDoc declaration and tasks anymore
- We don't need the check_docs.rb file anymore
- We also need to update CI configs to account for the above changes
  • Loading branch information
st0012 committed Sep 17, 2024
1 parent 7897fe6 commit 55f4244
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 163 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ jobs:
with:
bundler-cache: true

- name: Check if documentation is up to date
run: bundle exec rake ruby_lsp:check_docs

- name: Typecheck
run: bundle exec srb tc

Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ group :development do
gem "mocha", "~> 2.3"
gem "psych", "~> 5.1", require: false
gem "rake", "~> 13.2"
gem "rdoc", require: false, github: "Shopify/rdoc", branch: "create_snapper_generator"
gem "rubocop-md", "~> 1.2.0", require: false
gem "rubocop-minitest", "~> 0.35.0", require: false
gem "rubocop-rake", "~> 0.6.0", require: false
Expand Down
11 changes: 2 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
GIT
remote: https://github.com/Shopify/rdoc.git
revision: 92a6b4fcf8b72dd6776c9aa6714abe6f90d4a99e
branch: create_snapper_generator
specs:
rdoc (6.6.3.1)
psych (>= 4.0.0)

PATH
remote: .
specs:
Expand Down Expand Up @@ -58,6 +50,8 @@ GEM
sorbet-runtime (>= 0.5.9204)
rbs (3.5.3)
logger
rdoc (6.6.3.1)
psych (>= 4.0.0)
regexp_parser (2.9.2)
reline (0.5.10)
io-console (~> 0.5)
Expand Down Expand Up @@ -138,7 +132,6 @@ DEPENDENCIES
mocha (~> 2.3)
psych (~> 5.1)
rake (~> 13.2)
rdoc!
rubocop (~> 1.65)
rubocop-md (~> 1.2.0)
rubocop-minitest (~> 0.35.0)
Expand Down
15 changes: 0 additions & 15 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

require "bundler/gem_tasks"
require "rake/testtask"
require "rdoc/task"
require "ruby_lsp/check_docs"

Rake::TestTask.new(:test) do |t|
t.libs << "test"
Expand All @@ -19,21 +17,8 @@ namespace :test do
end
end

RDoc::Task.new do |rdoc|
rdoc.main = "README.md"
rdoc.title = "Ruby LSP documentation"
rdoc.rdoc_files.include("*.md", "lib/**/*.rb")
rdoc.rdoc_dir = "docs"
rdoc.markup = "markdown"
rdoc.generator = "snapper"
rdoc.options.push("--copy-files", "misc")
rdoc.options.push("--copy-files", "LICENSE.txt")
end

require "rubocop/rake_task"

RuboCop::RakeTask.new

RubyLsp::CheckDocs.new(FileList["#{__dir__}/lib/ruby_lsp/**/*.rb"], FileList["#{__dir__}/misc/**/*.gif"])

task default: ["test:indexer", :test]
5 changes: 0 additions & 5 deletions dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ up:
- vscode

commands:
docs:
run: bundle exec rake rdoc
subcommands:
check:
run: bundle exec rake ruby_lsp:check_docs
server: exe/ruby-lsp
style: bin/rubocop
typecheck:
Expand Down
130 changes: 0 additions & 130 deletions lib/ruby_lsp/check_docs.rb

This file was deleted.

3 changes: 3 additions & 0 deletions rakelib/index.rake
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# frozen_string_literal: true

require "sorbet-runtime"
require "ruby_lsp/internal"

# Based on https://github.com/ruby/prism/blob/main/rakelib/lex.rake

module GemIndexing
Expand Down

0 comments on commit 55f4244

Please sign in to comment.