lib/rbs/cli/diff.rb in rbs-3.3.2 vs lib/rbs/cli/diff.rb in rbs-3.4.0.pre.1
- old
+ new
@@ -11,10 +11,11 @@
# @type var type_name: String?
type_name = nil
library_options = library_options
before_path = []
after_path = []
+ detail = false
opt = OptionParser.new do |o|
o.banner = <<~HELP
[Experimental] This command is experimental. API and output compatibility is not guaranteed.
@@ -33,10 +34,11 @@
HELP
o.on("--format NAME") { |arg| @format = arg }
o.on("--type-name NAME") { |arg| type_name = arg }
o.on("--before DIR") { |arg| before_path << arg }
o.on("--after DIR") { |arg| after_path << arg }
+ o.on("--[no-]detail") { |arg| detail = arg }
end
opt.parse!(argv)
unless @format && type_name && ["markdown", "diff"].include?(@format)
@stderr.puts opt.banner
@@ -45,10 +47,11 @@
@diff = RBS::Diff.new(
type_name: TypeName(type_name).absolute!,
library_options: library_options,
after_path: after_path,
- before_path: before_path
+ before_path: before_path,
+ detail: detail,
)
end
def run
public_send("run_#{@format}")