diff --git a/CHANGELOG.md b/CHANGELOG.md index f95604e2af..301b84ab36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Changed + +* Print version at beginning of execution when detailed verbosity is set. [3148](https://github.com/fsprojects/fantomas/issues/3148) + ### Fixed * Idempotency problem with comments in applications on lambda expressions. [#3128](https://github.com/fsprojects/fantomas/issues/3128) diff --git a/src/Fantomas/Program.fs b/src/Fantomas/Program.fs index 8b873f7722..9b3e4215e2 100644 --- a/src/Fantomas/Program.fs +++ b/src/Fantomas/Program.fs @@ -462,9 +462,15 @@ Join our Discord community: https://discord.gg/Cpq9vf8BJH let asyncRunner = Async.Parallel >> Async.RunSynchronously - if Option.isSome version then + let versionLog = let version = CodeFormatter.GetVersion() - stdlog $"Fantomas v%s{version}" + $"Fantomas v%s{version}" + + if Option.isNone version then + logGrEqDetailed versionLog + + if Option.isSome version then + stdlog versionLog elif isDaemon then let daemon = new FantomasDaemon(Console.OpenStandardOutput(), Console.OpenStandardInput())