Sha256: 0a9268f26177e95bd6ee2e293f1aae6d2119e07a2b5dbf9d75bab7b6d4495f72
Contents?: true
Size: 600 Bytes
Versions: 4
Compression:
Stored size: 600 Bytes
Contents
# frozen_string_literal: true require 'json' module TaintedLove module Reporter # Reporter that outputs warnings into a JSON file class FileReporter < Base attr_reader :file_path def initialize(file_path = '/tmp/tainted_love.json') super() @file_path = file_path end def add_warning(warning) super(warning) update_file end def update_file report = { 'warnings': @warnings, 'application_path': Dir.pwd, } File.write(@file_path, report.to_json) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems