Sha256: 8b139f02e1a56413fb92ad76fc0269159c5ab5abb07371213021df0d2eecfce3
Contents?: true
Size: 548 Bytes
Versions: 8
Compression:
Stored size: 548 Bytes
Contents
require 'erb' module Codeqa module Checkers class CheckRubySyntax < Checker def self.check?(sourcefile) sourcefile.ruby? end def name 'ruby syntax' end def hint 'Ruby can not parse the file, please check it for syntax errors.' end def check with_existing_file do |filename| command = "/usr/bin/env ruby -c '#{filename}' 1>/dev/null 2>/dev/null" errors.add(nil, 'Ruby syntax error') unless system(command) end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems