Method: Codeqa::Checkers::CheckYard#check
- Defined in:
- lib/codeqa/checkers/check_yard.rb
#check ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/codeqa/checkers/check_yard.rb', line 25 def check if self.class.yard? ::YARD.parse_string(sourcefile.content) # let yard parse the file content io.rewind # rewind the io = io.read warnings = .match(/\A\[warn\]: /) errors.add(nil, .gsub(/\(stdin\)/, sourcefile.filename)) if warnings end ensure io.reopen # clear the message for the next file end |