Sha256: 921e8b0f39e749924b58a3fb8d1ec6700521ef9e68c4edee3143cf01f4de673e
Contents?: true
Size: 1.1 KB
Versions: 32
Compression:
Stored size: 1.1 KB
Contents
module Steep module Drivers class Validate attr_reader :stdout attr_reader :stderr include Utils::DriverHelper def initialize(stdout:, stderr:) @stdout = stdout @stderr = stderr end def run project = load_config() loader = Project::FileLoader.new(project: project) loader.load_signatures() type_check(project) project.targets.each do |target| Steep.logger.tagged "target=#{target.name}" do case (status = target.status) when Project::Target::SignatureSyntaxErrorStatus printer = SignatureErrorPrinter.new(stdout: stdout, stderr: stderr) printer.print_syntax_errors(status.errors) when Project::Target::SignatureValidationErrorStatus printer = SignatureErrorPrinter.new(stdout: stdout, stderr: stderr) printer.print_semantic_errors(status.errors) end end end project.targets.all? {|target| target.status.is_a?(Project::Target::TypeCheckStatus) } ? 0 : 1 end end end end
Version data entries
32 entries across 32 versions & 1 rubygems