<commit_before>(ns ^{:doc "JUnit formatter for Midje output"}
  midje.emission.plugins.junit
  (:use
    [midje.emission.util])
  (:require [midje.data.fact :as fact]
            [midje.emission.state :as state]
            [midje.emission.plugins.silence :as silence]
            [midje.emission.plugins.default-failure-lines :as lines]
            [clojure.string :as str]
            [clojure.xml :as xml :only [emit-element]]))

(def report-file "report.xml")

(defn log-fn []
  (fn [text] (spit report-file text :append true)))

(defn- log [string]
  (let [log-fn (log-fn)]
    (log-fn string)))

(defn- reset-log []
  (spit report-file ""))

(defn def-fact-cache []<commit_msg>Junit plugin requires :print-level to be :print-fact<commit_after>(ns ^{:doc "JUnit formatter for Midje output"}
  midje.emission.plugins.junit
  (:use
    [midje.emission.util])
  (:require [midje.config :as config]
            [midje.data.fact :as fact]
            [midje.emission.state :as state]
            [midje.emission.plugins.silence :as silence]
            [midje.emission.plugins.default-failure-lines :as lines]
            [clojure.string :as str]
            [clojure.xml :as xml :only [emit-element]]))


;; This plugin requires all emission api calls to be
;; forwarded to it.
(config/change-defaults :print-level :print-facts)

(def report-file "report.xml")

(defn log-fn []
  (fn [text] (spit report-file text :append true)))

(defn- log [string]
  (let [log-fn (log-fn)]
    (log-fn string)))

(defn- reset-log []
  (spit report-file ""))

(defn def-fact-cache []
{'fraction_non_alphanumeric': 0.15487571701720843, 'fraction_numerical': 0.0, 'mean_word_length': 2.876543209876543, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3612993', 'n_tokens_mistral': 558, 'n_tokens_neox': 540, 'n_words': 138}