Module: Docscribe::CLI::CheckForComments
- Defined in:
- lib/docscribe/cli/check_for_comments.rb
Overview
Check for default placeholder text in generated documentation.
Usage:
docscribe check_for_comments [paths...]
Reads the configured placeholder messages from docscribe.yml (or defaults) and scans Ruby source files for YARD comments containing those placeholders. Exits non-zero if any are found.
Constant Summary collapse
- BANNER =
<<~TEXT Usage: docscribe check_for_comments [paths...] Check for default placeholder documentation text in Ruby source files. Reads placeholder messages from docscribe.yml config (or built-in defaults) and scans .rb files for YARD comments still containing that text. Useful in CI to catch auto-generated text that should have been replaced. TEXT
Class Method Summary collapse
Class Method Details
.run(argv) ⇒ Integer
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/docscribe/cli/check_for_comments.rb', line 34 def run(argv) config = Docscribe::Config.load placeholders = resolve_placeholders(config) return no_placeholders_configured if placeholders.empty? (argv) paths = (argv) return no_paths if paths.empty? results = scan_paths(paths, placeholders) process_results(results) end |