2020-06-03 06:52:47 +00:00
|
|
|
#addin "nuget:?package=CodeFileSanity&version=0.0.36"
|
2019-11-24 09:50:48 +00:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// ARGUMENTS
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
var target = Argument("target", "CodeAnalysis");
|
|
|
|
var configuration = Argument("configuration", "Release");
|
|
|
|
|
|
|
|
var rootDirectory = new DirectoryPath("..");
|
|
|
|
var sln = rootDirectory.CombineWithFilePath("osu.sln");
|
|
|
|
var desktopSlnf = rootDirectory.CombineWithFilePath("osu.Desktop.slnf");
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// TASKS
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
Task("InspectCode")
|
|
|
|
.Does(() => {
|
2020-11-16 05:57:52 +00:00
|
|
|
var inspectcodereport = "inspectcodereport.xml";
|
|
|
|
var cacheDir = "inspectcode";
|
|
|
|
var verbosity = AppVeyor.IsRunningOnAppVeyor ? "WARN" : "INFO"; // Don't flood CI output
|
2019-11-24 09:50:48 +00:00
|
|
|
|
2020-11-16 05:57:52 +00:00
|
|
|
DotNetCoreTool(rootDirectory.FullPath,
|
|
|
|
"jb", $@"inspectcode ""{desktopSlnf}"" --output=""{inspectcodereport}"" --caches-home=""{cacheDir}"" --verbosity={verbosity}");
|
|
|
|
DotNetCoreTool(rootDirectory.FullPath, "nvika", $@"parsereport ""{inspectcodereport}"" --treatwarningsaserrors");
|
2019-11-24 09:50:48 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
Task("CodeFileSanity")
|
|
|
|
.Does(() => {
|
|
|
|
ValidateCodeSanity(new ValidateCodeSanitySettings {
|
|
|
|
RootDirectory = rootDirectory.FullPath,
|
|
|
|
IsAppveyorBuild = AppVeyor.IsRunningOnAppVeyor
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
Task("CodeAnalysis")
|
|
|
|
.IsDependentOn("CodeFileSanity")
|
|
|
|
.IsDependentOn("InspectCode");
|
|
|
|
|
|
|
|
RunTarget(target);
|