【问题标题】:How can I integrate Fantomas with MSBuild / dotnet CLI如何将 Fantomas 与 MSBuild / dotnet CLI 集成
【发布时间】:2020-11-10 11:10:38
【问题描述】:

我有使用 .NET Core CLI (dotnet build) 构建的 F# 解决方案和项目。我想使用Fantomas (dotnet tool run fantomas) 格式化我的代码。

问题是 Fantomas 不理解 .sln.fsproj 文件。这意味着我需要在我的每个项目文件上维护一个调用 Fantomas 的脚本,随着时间的推移可能会变得不同步。

是否有一种我不知道的机制可以轻松地将 Fantomas 与 MSBuild 结合使用?

【问题讨论】:

    标签: .net-core f# fantomas


    【解决方案1】:

    将 fantomas 应用于某个目录中的所有 .fs 文件有什么问题?这样您就不需要涉及 .sln 或 .fsproj 文件。

    如果您不想通过格式化程序传递特定文件,可以将其包含在 .fantomasignore 文件中。

    【讨论】:

      猜你喜欢
      • 2017-09-11
      • 2011-09-26
      • 2020-04-04
      • 1970-01-01
      • 2017-10-21
      • 1970-01-01
      • 2020-01-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多