From 9745527f0cc1124b5ae77639231523589f9cf759 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Mon, 2 Dec 2024 10:56:54 +0900 Subject: [PATCH] Move diagnostics list to `manual` --- .github/workflows/ruby.yml | 2 +- bin/generate-diagnostics-docs.rb | 6 +++--- guides/README.md | 1 - .../src/diagnostics/ruby.md => manual/ruby-diagnostics.md | 0 4 files changed, 4 insertions(+), 5 deletions(-) rename guides/src/diagnostics/ruby.md => manual/ruby-diagnostics.md (100%) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 7bf97d45d..2b5eb9574 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -45,5 +45,5 @@ jobs: gem install bundler bin/setup bundle exec ruby bin/generate-diagnostics-docs.rb - git diff --exit-code HEAD -- guides/src/diagnostics + git diff --exit-code HEAD -- manual diff --git a/bin/generate-diagnostics-docs.rb b/bin/generate-diagnostics-docs.rb index ec5c95196..ff321b05a 100644 --- a/bin/generate-diagnostics-docs.rb +++ b/bin/generate-diagnostics-docs.rb @@ -99,11 +99,11 @@ def self.visit_file(path, &block) end diagnostic_dir = Pathname(__dir__ || raise) + "../sig/steep/diagnostic" -output_dir = Pathname(__dir__ || raise) + "../guides/src/diagnostics" +output_dir = Pathname(__dir__ || raise) + "../manual" RubyDiagnosticsVisitor.visit_file(diagnostic_dir + "ruby.rbs") do |visitor| - STDERR.puts ">> Writing #{output_dir + "ruby.md"}..." - (output_dir + "ruby.md").open("w") do |io| + STDERR.puts ">> Writing #{output_dir + "ruby-diagnostics.md"}..." + (output_dir + "ruby-diagnostics.md").open("w") do |io| io.puts "# Ruby Code Diagnostics" io.puts visitor.format_templates(io) diff --git a/guides/README.md b/guides/README.md index d5797f93b..ff32eb016 100644 --- a/guides/README.md +++ b/guides/README.md @@ -3,4 +3,3 @@ * [Getting Started with Steep in 5 minutes](src/getting-started/getting-started.md) * [Using RBS from gem_rbs_collection](src/gem-rbs-collection/gem-rbs-collection.md) * [`nil` and Optional types](src/nil-optional/nil-optional.md) -* [Diagnostics for Ruby code](src/diagnostics/ruby.md) diff --git a/guides/src/diagnostics/ruby.md b/manual/ruby-diagnostics.md similarity index 100% rename from guides/src/diagnostics/ruby.md rename to manual/ruby-diagnostics.md