Skip to content
This repository was archived by the owner on Apr 6, 2024. It is now read-only.

Commit ae12fbb

Browse files
committed
Merge tag '0.9.0' into develop
2 parents 05bf1dc + 9d23879 commit ae12fbb

File tree

121 files changed

+8718
-2063
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+8718
-2063
lines changed

demos/build.cake

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,42 @@
1+
#addin "Cake.Markdownlint"
12
#addin "Cake.Issues&prerelease"
23
#addin "Cake.Issues.MsBuild&prerelease"
34
#addin "Cake.Issues.Markdownlint&prerelease"
5+
#addin "Cake.Issues.DupFinder&prerelease"
46
#addin "Cake.Issues.InspectCode&prerelease"
57
#addin "Cake.Issues.Reporting&prerelease"
68
#addin "Cake.Issues.Reporting.Generic&prerelease"
79

10+
#tool "nuget:?package=JetBrains.ReSharper.CommandLineTools"
11+
812
#load build/build/build.cake
913
#load build/analyze/analyze.cake
10-
#load build/read-issues/read-issues.cake
1114
#load build/create-reports/create-reports.cake
1215

1316
var target = Argument("target", "Default");
1417

1518
public class BuildData
1619
{
17-
public DirectoryPath RepoRootFolder { get; }
18-
public DirectoryPath SourceFolder { get; }
19-
public DirectoryPath DocsFolder { get; }
20-
public DirectoryPath TemplateGalleryFolder { get; }
21-
public FilePath MsBuildLogFilePath { get; }
22-
public FilePath InspectCodeLogFilePath { get; }
23-
public FilePath MarkdownLintLogFilePath { get; }
24-
public List<IIssue> Issues { get; }
25-
26-
public BuildData(ICakeContext context)
27-
{
20+
public DirectoryPath RepoRootFolder { get; }
21+
public DirectoryPath SourceFolder { get; }
22+
public DirectoryPath DocsFolder { get; }
23+
public DirectoryPath TemplateGalleryFolder { get; }
24+
public List<IIssue> Issues { get; }
25+
26+
public BuildData(ICakeContext context)
27+
{
2828
this.RepoRootFolder = context.MakeAbsolute(context.Directory("./"));
2929
this.SourceFolder = this.RepoRootFolder.Combine("src");
3030
this.DocsFolder = this.RepoRootFolder.Combine("docs");
3131
this.TemplateGalleryFolder = this.RepoRootFolder.Combine("../docs/templates");
32-
this.MsBuildLogFilePath = this.RepoRootFolder.CombineWithFilePath("msbuild.binlog");
33-
this.InspectCodeLogFilePath = this.RepoRootFolder.CombineWithFilePath("inspectCode.log");
34-
this.MarkdownLintLogFilePath = this.RepoRootFolder.CombineWithFilePath("markdown.log");
32+
3533
this.Issues = new List<IIssue>();
36-
}
34+
}
3735
}
3836

3937
Setup<BuildData>(setupContext =>
4038
{
41-
return new BuildData(setupContext);
39+
return new BuildData(setupContext);
4240
});
4341

4442
Task("Default")

demos/build/analyze/analyze.cake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
#load dupfinder.cake
12
#load inspectcode.cake
23
#load markdownlint.cake
34
#load custom-issue.cake
45

56
Task("Analyze")
67
.IsDependentOn("Build")
8+
.IsDependentOn("Run-DupFinder")
79
.IsDependentOn("Run-InspectCode")
810
.IsDependentOn("Lint-Documentation")
911
.IsDependentOn("Create-CustomIssues");

demos/build/analyze/dupfinder.cake

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Task("Run-DupFinder")
2+
.Description("Runs JetBrains DupFinder analysis")
3+
.WithCriteria((context) => context.IsRunningOnWindows(), "DupFinder is only supported on Windows.")
4+
.Does<BuildData>((data) =>
5+
{
6+
var dupFinderLogFilePath =
7+
data.RepoRootFolder.CombineWithFilePath("dupFinder.log");
8+
9+
// Run DupFinder
10+
var settings = new DupFinderSettings() {
11+
OutputFile = dupFinderLogFilePath
12+
};
13+
14+
DupFinder(
15+
data.SourceFolder.CombineWithFilePath("ClassLibrary1.sln"),
16+
settings);
17+
18+
// Read issues
19+
var readIssuesSettings = new ReadIssuesSettings(data.RepoRootFolder)
20+
{
21+
FileLinkSettings =
22+
IssueFileLinkSettingsForGitHubBranch(
23+
new System.Uri("https://github.com/cake-contrib/Cake.Issues.Reporting.Generic"),
24+
"develop",
25+
"demos"
26+
)
27+
};
28+
29+
data.Issues.AddRange(
30+
ReadIssues(
31+
DupFinderIssuesFromFilePath(dupFinderLogFilePath),
32+
readIssuesSettings));
33+
});

demos/build/analyze/inspectcode.cake

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
1-
#tool "nuget:?package=JetBrains.ReSharper.CommandLineTools"
2-
31
Task("Run-InspectCode")
42
.Description("Runs JetBrains InspectCode analysis")
53
.WithCriteria((context) => context.IsRunningOnWindows(), "InspectCode is only supported on Windows.")
64
.Does<BuildData>(data =>
75
{
6+
var inspectCodeLogFilePath =
7+
data.RepoRootFolder.CombineWithFilePath("inspectCode.log");
8+
9+
// Run InspectCode
810
var settings = new InspectCodeSettings() {
9-
OutputFile = data.InspectCodeLogFilePath
11+
OutputFile = inspectCodeLogFilePath
1012
};
1113

1214
InspectCode(data.SourceFolder.CombineWithFilePath("ClassLibrary1.sln"), settings);
15+
16+
// Read issues
17+
var readIssuesSettings = new ReadIssuesSettings(data.RepoRootFolder)
18+
{
19+
FileLinkSettings =
20+
IssueFileLinkSettingsForGitHubBranch(
21+
new System.Uri("https://github.com/cake-contrib/Cake.Issues.Reporting.Generic"),
22+
"develop",
23+
"demos"
24+
)
25+
};
26+
27+
data.Issues.AddRange(
28+
ReadIssues(
29+
InspectCodeIssuesFromFilePath(inspectCodeLogFilePath),
30+
readIssuesSettings));
1331
});

demos/build/analyze/markdownlint.cake

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,69 @@
1-
#addin "Cake.Markdownlint"
2-
31
Task("Lint-Documentation")
4-
.Description("Runs Markdownint on documentation")
2+
.IsDependentOn("Lint-DemoDocumentation")
3+
.IsDependentOn("Lint-TemplateGalleryDocumentation");
4+
5+
Task("Lint-DemoDocumentation")
6+
.Description("Runs Markdownint on demo documentation")
57
.Does<BuildData>(data =>
68
{
9+
var markdownLintLogFilePath = data.RepoRootFolder.CombineWithFilePath("markdown.log");
10+
11+
// Run markdownlint
712
var settings =
813
MarkdownlintNodeJsRunnerSettings.ForDirectory(data.DocsFolder);
9-
settings.OutputFile = data.MarkdownLintLogFilePath;
14+
settings.OutputFile = markdownLintLogFilePath;
15+
settings.ThrowOnIssue = false;
16+
RunMarkdownlintNodeJs(settings);
17+
18+
// Read issues
19+
var readIssuesSettings = new ReadIssuesSettings(data.RepoRootFolder)
20+
{
21+
Run = "Demos documentation",
22+
FileLinkSettings =
23+
IssueFileLinkSettingsForGitHubBranch(
24+
new System.Uri("https://github.com/cake-contrib/Cake.Issues.Reporting.Generic"),
25+
"develop",
26+
"demos"
27+
)
28+
};
29+
30+
data.Issues.AddRange(
31+
ReadIssues(
32+
MarkdownlintIssuesFromFilePath(
33+
markdownLintLogFilePath,
34+
MarkdownlintCliLogFileFormat),
35+
readIssuesSettings));
36+
});
37+
38+
Task("Lint-TemplateGalleryDocumentation")
39+
.Description("Runs Markdownint on template gallery documentation")
40+
.Does<BuildData>(data =>
41+
{
42+
var markdownLintLogFilePath = data.RepoRootFolder.CombineWithFilePath("markdown.log");
43+
44+
// Run markdownlint
45+
var settings =
46+
MarkdownlintNodeJsRunnerSettings.ForDirectory(data.TemplateGalleryFolder);
47+
settings.OutputFile = markdownLintLogFilePath;
1048
settings.ThrowOnIssue = false;
1149
RunMarkdownlintNodeJs(settings);
50+
51+
// Read issues
52+
var readIssuesSettings = new ReadIssuesSettings(data.RepoRootFolder)
53+
{
54+
Run = "Template gallery documentation",
55+
FileLinkSettings =
56+
IssueFileLinkSettingsForGitHubBranch(
57+
new System.Uri("https://github.com/cake-contrib/Cake.Issues.Reporting.Generic"),
58+
"develop",
59+
"docs"
60+
)
61+
};
62+
63+
data.Issues.AddRange(
64+
ReadIssues(
65+
MarkdownlintIssuesFromFilePath(
66+
markdownLintLogFilePath,
67+
MarkdownlintCliLogFileFormat),
68+
readIssuesSettings));
1269
});

demos/build/build/build.cake

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Task("Build")
33
.Does<BuildData>(data =>
44
{
55
var solutionFile = data.SourceFolder.CombineWithFilePath("ClassLibrary1.sln");
6+
var msBuildLogFilePath = data.RepoRootFolder.CombineWithFilePath("msbuild.binlog");
67

78
#if NETCOREAPP
89
DotNetCoreRestore(solutionFile.FullPath);
@@ -13,7 +14,7 @@ Task("Build")
1314
.WithLogger(
1415
"BinaryLogger," + Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll"),
1516
"",
16-
data.MsBuildLogFilePath.FullPath
17+
msBuildLogFilePath.FullPath
1718
);
1819

1920
DotNetCoreBuild(
@@ -31,7 +32,25 @@ Task("Build")
3132
.WithLogger(
3233
Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll").FullPath,
3334
"BinaryLogger",
34-
data.MsBuildLogFilePath.FullPath);
35+
msBuildLogFilePath.FullPath);
3536
MSBuild(solutionFile, settings);
3637
#endif
38+
39+
// Read issues
40+
var readIssuesSettings = new ReadIssuesSettings(data.RepoRootFolder)
41+
{
42+
FileLinkSettings =
43+
IssueFileLinkSettingsForGitHubBranch(
44+
new System.Uri("https://github.com/cake-contrib/Cake.Issues.Reporting.Generic"),
45+
"develop",
46+
"demos"
47+
)
48+
};
49+
50+
data.Issues.AddRange(
51+
ReadIssues(
52+
MsBuildIssuesFromFilePath(
53+
msBuildLogFilePath,
54+
MsBuildBinaryLogFileFormat),
55+
readIssuesSettings));
3756
});

demos/build/create-reports/create-reports-htmldatatable-default.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Task("Create-Reports-HtmlDataTable-Default")
22
.Description("Creates HtmlDataTable default demo report")
3-
.IsDependentOn("Read-Issues")
3+
.IsDependentOn("Analyze")
44
.Does<BuildData>(data =>
55
{
66
CreateIssueReport(

demos/build/create-reports/create-reports-htmldiagnostic-default.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Task("Create-Reports-HtmlDiagnostic-Default")
22
.Description("Creates HtmlDiagnostic default demo report")
3-
.IsDependentOn("Read-Issues")
3+
.IsDependentOn("Analyze")
44
.Does<BuildData>(data =>
55
{
66
CreateIssueReport(

demos/build/create-reports/create-reports-htmldxdatagrid-additional-columns.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Task("Create-Reports-HtmlDxDataGrid-Additional-Columns")
22
.Description("Creates HtmlDxDataGrid demo report showing how to add additional columns to a report")
3-
.IsDependentOn("Read-Issues")
3+
.IsDependentOn("Analyze")
44
.Does<BuildData>(data =>
55
{
66
CreateIssueReport(

demos/build/create-reports/create-reports-htmldxdatagrid-change-title.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Task("Create-Reports-HtmlDxDataGrid-Change-Title")
22
.Description("Creates HtmlDxDataGrid demo report showing how to change report title")
3-
.IsDependentOn("Read-Issues")
3+
.IsDependentOn("Analyze")
44
.Does<BuildData>(data =>
55
{
66
CreateIssueReport(

0 commit comments

Comments
 (0)