Skip to content

Commit c062df2

Browse files
authored
Fix the format issue in the CI (#1222)
* call fantomas directly instead of using msbuild target * just check the format * no need to exclude obj directories if we pass in just a directory
1 parent e224f1a commit c062df2

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
run: dotnet tool restore
8888

8989
- name: Check format
90-
run: dotnet build -t:CheckFormat
90+
run: dotnet fantomas --check src
9191
env:
9292
DOTNET_ROLL_FORWARD: LatestMajor
9393
DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1

Directory.Solution.targets

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
<Project>
2-
<ItemGroup>
3-
<FormatInputs Include="src/**/*.fs;src/**/*.fsi" Exclude="src/**/obj/**/*.fs" />
4-
</ItemGroup>
5-
62
<Target Name="Format">
7-
<Exec Command="dotnet fantomas @(FormatInputs, ' ') " />
3+
<Exec Command="dotnet fantomas src" />
84
</Target>
95

106
<Target Name="CheckFormat">
11-
<Exec Command="dotnet fantomas --check @(FormatInputs, ' ') " />
7+
<Exec Command="dotnet fantomas --check src" />
128
</Target>
139

1410
<ItemGroup>

0 commit comments

Comments
 (0)