<commit_before>﻿/// Contains tasks which allow to run FSharp.Formatting for generating documentation.
module Fake.FSFHelper

/// Specifies the fsformatting executable
let mutable fsformattingPath = findToolInSubPath "fsformatting.exe" (currentDirectory @@ "tools" @@ "fsformatting")
    
/// Specifies a global timeout for fsformatting.exe
let mutable fsformattingTimeOut = System.TimeSpan.MaxValue

/// Runs fsformatting.exe with the given command in the given repository directory.
let runFSFormattingCommand workingDir quiet command =
    let redirectOutputToTrace_ = redirectOutputToTrace
    redirectOutputToTrace <- quiet
    let ret = ExecProcess (fun info ->  
        info.FileName <- fsformattingPath
        info.WorkingDirectory <- workingDir
        info.Arguments <- command) fsformattingTimeOut
    redirectOutputToTrace <- redirectOutputToTrace_
    if ret <> 0
    then
        failwithf "FSharp.Formatting %s failed." command
   
let CreateDocsForDlls workingDir quiet command dllFiles =
    for file in dllFiles do 
        let command = command + sprintf " --dllfiles %s" file
                
        runFSFormattingCommand "." quiet command
        printfn "Successfully generated doc for DLL %s" file<commit_msg>Remove quiet parameter in FSFormatting<commit_after>﻿/// Contains tasks which allow to run FSharp.Formatting for generating documentation.
module Fake.FSFHelper

/// Specifies the fsformatting executable
let mutable fsformattingPath = findToolInSubPath "fsformatting.exe" (currentDirectory @@ "tools" @@ "fsformatting")
    
/// Specifies a global timeout for fsformatting.exe
let mutable fsformattingTimeOut = System.TimeSpan.MaxValue

/// Runs fsformatting.exe with the given command in the given repository directory.
let runFSFormattingCommand workingDir command =
    if 0 <> ExecProcess (fun info ->  
        info.FileName <- fsformattingPath
        info.WorkingDirectory <- workingDir
        info.Arguments <- command) fsformattingTimeOut
    then
        failwithf "FSharp.Formatting %s failed." command
   
let CreateDocsForDlls workingDir command dllFiles =
    for file in dllFiles do 
        let command = command + sprintf " --dllfiles %s" file
                
        runFSFormattingCommand "." command
        printfn "Successfully generated doc for DLL %s" file
{'fraction_non_alphanumeric': 0.06646525679758308, 'fraction_numerical': 0.0008631851532153647, 'mean_word_length': 3.390151515151515, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 7, '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': '6020807', 'n_tokens_mistral': 636, 'n_tokens_neox': 596, 'n_words': 206}