Class: Slidict::Cli::Lint
- Inherits:
-
Object
- Object
- Slidict::Cli::Lint
- Includes:
- Options
- Defined in:
- lib/slidict/cli/lint.rb
Overview
Implements slidict lint <file>: diagnoses whether a Markdown/Asciidoc
slide deck has a structure that an audience can actually follow (not
whether it looks nice). Diagnosis only -- it does not rewrite the file.
Constant Summary collapse
- ASCIIDOC_EXTENSIONS =
%w[.adoc .asciidoc].freeze
Constants included from Options
Options::FAILURE, Options::MISSING, Options::SUCCESS
Instance Method Summary collapse
Methods included from Options
Instance Method Details
#run(argv) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/slidict/cli/lint.rb', line 27 def run(argv) = parse(argv) return print_help if [:help] || [:path].nil? return file_not_found([:path]) unless File.exist?([:path]) run_lint() rescue ArgumentError => e print_usage_error(e) rescue Slidict::Lint::Linter::Error, Llm::Client::Error => e print_error(e) end |