<commit_before>(ns ^{:doc "Customizable configuration"}
  midje.config
  (:use midje.clojure.core
        [midje.util.exceptions :only [user-error]])
  (:require [midje.emission.levels :as levels]
            [midje.util.ecosystem :as ecosystem]))
  
;;; I consider whether we're running in the repl part of the config. This matters because
;;; threads can't examine the stack to see if they're in the repl. So we check once at
;;; startup time.

(def ^{:private true} started-in-repl?
     (try
       (throw (Exception.))
       (catch Exception e
         (not (empty? (filter #(.contains % "clojure.main$repl$read_eval_print")
                              (map str (.getStackTrace e))))))))

(defn running-in-repl? []
  started-in-repl?)



;; TODO: In 1.6 or later, *allow-default-prerequisites* should be merged
;; into the *config* map. A deprecation notice has been added where it's used.
(def ^{:dynamic true
       :doc "Controls whether unmatched prerequisites 'fall through' to real function.
             DEPRECATED: Use config variable :partial-prerequisites instead."
       :deprecated "1.5"}
     *allow-default-prerequisites* false)


(defonce ^{:dynamic true}
  *config* {:print-level :print-normally
            :visible-deprecation true
            :visible-future true
            :visible-failure-namespaces false
            :partial-prerequisites false
            :check-after-creation true
            :emitter 'midje.emission.plugins.default
            :check-recorder (fn [example-map prerequisite-maps])
            :fact-filter (constantly true)})<commit_msg>Default to on for now for green tests.<commit_after>(ns ^{:doc "Customizable configuration"}
  midje.config
  (:use midje.clojure.core
        [midje.util.exceptions :only [user-error]])
  (:require [midje.emission.levels :as levels]
            [midje.util.ecosystem :as ecosystem]))
  
;;; I consider whether we're running in the repl part of the config. This matters because
;;; threads can't examine the stack to see if they're in the repl. So we check once at
;;; startup time.

(def ^{:private true} started-in-repl?
     (try
       (throw (Exception.))
       (catch Exception e
         (not (empty? (filter #(.contains % "clojure.main$repl$read_eval_print")
                              (map str (.getStackTrace e))))))))

(defn running-in-repl? []
  started-in-repl?)



;; TODO: In 1.6 or later, *allow-default-prerequisites* should be merged
;; into the *config* map. A deprecation notice has been added where it's used.
(def ^{:dynamic true
       :doc "Controls whether unmatched prerequisites 'fall through' to real function.
             DEPRECATED: Use config variable :partial-prerequisites instead."
       :deprecated "1.5"}
     *allow-default-prerequisites* false)


(defonce ^{:dynamic true}
  *config* {:print-level :print-normally
            :visible-deprecation true
            :visible-future true
            :visible-failure-namespace true
            :partial-prerequisites false
            :check-after-creation true
            :emitter 'midje.emission.plugins.default
            :check-recorder (fn [example-map prerequisite-maps])
            :fact-filter (constantly true)})
{'fraction_non_alphanumeric': 0.11630807608356719, 'fraction_numerical': 0.002494543186778921, 'mean_word_length': 2.7345750873108265, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '4513313', 'n_tokens_mistral': 965, 'n_tokens_neox': 910, 'n_words': 292}