brew/Library/Homebrew/yard/ignore_directives.rb
Issy Long b7d997e80d
sorbet: Bump some files from typed: false to typed: true
- This was done with `brew typecheck --update --suggest-typed` which
  (as of the previous commit) uses Spoom, yet another gem. I thought I'd
  see how well it works. There are no Sorbet errors after these changes!
2022-10-11 01:09:03 +01:00

12 lines
344 B
Ruby

# typed: true
# frozen_string_literal: true
# from https://github.com/lsegal/yard/issues/484#issuecomment-442586899
class IgnoreDirectiveDocstringParser < YARD::DocstringParser
def parse_content(content)
super(content&.sub(/(\A(typed|.*rubocop)|TODO):.*/m, ""))
end
end
YARD::Docstring.default_parser = IgnoreDirectiveDocstringParser