1

I have F# solutions and projects that build using the .NET Core CLI (dotnet build). I would like to format my code using Fantomas (dotnet tool run fantomas).

The problem is that Fantomas does not understand .sln or .fsproj files. This means that I will need to maintain a script for calling Fantomas on each of my project files, which might become out-of-sync over time.

Is there a mechanism for easily using Fantomas with MSBuild that I am not aware of?

sdgfsdh
  • 33,689
  • 26
  • 132
  • 245

1 Answers1

0

What's wrong with applying fantomas to all .fs files in a certain directory? This way you don't need to involve .sln or .fsproj files.

In case there's a specific file that you don't want to pass by the formatter, you can include it in a .fantomasignore file.

knocte
  • 16,941
  • 11
  • 79
  • 125