Skip to content

Commit

Permalink
Merge branch 'release/0.11.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Dec 17, 2018
2 parents b73d99b + 56e5874 commit 6612712
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Build process output
docs/input/tasks/

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
Expand Down
4 changes: 2 additions & 2 deletions nuspec/nuget/Cake.DocFx.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<summary>The DocFx Addin for Cake allows you to generated API documentation directly from .NET source code.</summary>
<licenseUrl>https://github.com/cake-contrib/Cake.DocFx/blob/develop/LICENSE</licenseUrl>
<projectUrl>https://github.com/cake-contrib/Cake.DocFx</projectUrl>
<iconUrl>https://cdn.rawgit.com/cake-contrib/graphics/a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png</iconUrl>
<iconUrl>https://cdn.jsdelivr.net/gh/cake-contrib/graphics@a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<copyright>Copyright (c) Cake Contributions 2016 - Present</copyright>
<tags>Cake Script DocFx</tags>
<releaseNotes>https://github.com/cake-contrib/Cake.DocFx/releases/tag/0.10.0</releaseNotes>
<releaseNotes>https://github.com/cake-contrib/Cake.DocFx/releases/tag/0.11.0</releaseNotes>
</metadata>
<files>
<file src="netstandard2.0\Cake.DocFx.dll" target="lib\netstandard2.0" />
Expand Down
17 changes: 17 additions & 0 deletions src/Cake.DocFx.Tests/Build/DocFxBuildRunnerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,23 @@ public void Should_Add_Force_To_Arguments_If_True()
// Then
Assert.Equal("build --force", result.Args);
}


[Fact]
public void Should_Add_WarningsAsErrors_To_Arguments_If_True()
{
// Given
var fixture = new DocFxBuildRunnerFixture
{
Settings = { WarningsAsErrors = true }
};

// When
var result = fixture.Run();

// Then
Assert.Equal("build --warningsAsErrors", result.Args);
}
}
}
}
5 changes: 5 additions & 0 deletions src/Cake.DocFx/Build/DocFxBuildRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ private ProcessArgumentBuilder GetArguments(FilePath configFile, DocFxBuildSetti
builder.Append("--force");
}

if (settings.WarningsAsErrors)
{
builder.Append("--warningsAsErrors");
}

return builder;
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/Cake.DocFx/Build/DocFxBuildSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,10 @@ public class DocFxBuildSettings : ToolSettings
/// Gets or sets a value indicating whether all the documentation is re-build.
/// </summary>
public bool Force { get; set; }

/// <summary>
/// Gets or sets a value indicating whether all warnings must be seen as errors
/// </summary>
public bool WarningsAsErrors { get; set; }
}
}

0 comments on commit 6612712

Please sign in to comment.