1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-11 03:32:55 +08:00

Add dotnet format check.

This commit is contained in:
Huo Yaoyuan 2019-11-11 20:32:32 +08:00
parent e9b8cbb516
commit d385862267
2 changed files with 11 additions and 0 deletions

View File

@ -7,6 +7,12 @@
"commands": [ "commands": [
"dotnet-cake" "dotnet-cake"
] ]
},
"dotnet-format": {
"version": "3.1.37601",
"commands": [
"dotnet-format"
]
} }
} }
} }

View File

@ -11,6 +11,7 @@ var target = Argument("target", "Build");
var configuration = Argument("configuration", "Release"); var configuration = Argument("configuration", "Release");
var rootDirectory = new DirectoryPath(".."); var rootDirectory = new DirectoryPath("..");
var sln = rootDirectory.CombineWithFilePath("osu.sln");
var desktopBuilds = rootDirectory.CombineWithFilePath("build/Desktop.proj"); var desktopBuilds = rootDirectory.CombineWithFilePath("build/Desktop.proj");
var desktopSlnf = rootDirectory.CombineWithFilePath("osu.Desktop.slnf"); var desktopSlnf = rootDirectory.CombineWithFilePath("osu.Desktop.slnf");
@ -60,8 +61,12 @@ Task("CodeFileSanity")
}); });
}); });
Task("DotnetFormat")
.Does(() => DotNetCoreTool(sln.FullPath, "format", "--dry-run --check"));
Task("Build") Task("Build")
.IsDependentOn("CodeFileSanity") .IsDependentOn("CodeFileSanity")
.IsDependentOn("DotnetFormat")
.IsDependentOn("InspectCode") .IsDependentOn("InspectCode")
.IsDependentOn("Test"); .IsDependentOn("Test");