log
if (tripleColonObj is Block)
{
renderer.WriteLine("");
- } else
+ }
+ else
{
renderer.WriteLine("");
}
@@ -136,7 +137,7 @@ public bool Render(HtmlRenderer renderer, MarkdownObject obj, Action log
}
else
{
- if(tripleColonObj is Block) renderer.WriteLine("");
+ if (tripleColonObj is Block) renderer.WriteLine("
");
}
if (!string.IsNullOrEmpty(currentLink))
{
@@ -157,13 +158,13 @@ public bool Render(HtmlRenderer renderer, MarkdownObject obj, Action log
{
renderer.Write("");
- if(tripleColonObj is ContainerBlock
+ if (tripleColonObj is ContainerBlock
&& (tripleColonObj as ContainerBlock).LastChild != null)
{
var inline = ((tripleColonObj as ContainerBlock).LastChild as ParagraphBlock).Inline;
renderer.WriteChildren(inline);
}
-
+
}
else
{
@@ -185,9 +186,10 @@ public bool Render(HtmlRenderer renderer, MarkdownObject obj, Action log
if (tripleColonObj is Block)
{
renderer.WriteLine("
");
- } else
+ }
+ else
{
- if(currentBorder) renderer.WriteLine("");
+ if (currentBorder) renderer.WriteLine("");
renderer.WriteChildren(tripleColonObj as ContainerInline);
}
return true;
diff --git a/src/Microsoft.DocAsCode.MarkdigEngine.Extensions/TripleColon/TripleColonBlockParser.cs b/src/Microsoft.DocAsCode.MarkdigEngine.Extensions/TripleColon/TripleColonBlockParser.cs
index 6a6fccc2f9a..b449c4e61bd 100644
--- a/src/Microsoft.DocAsCode.MarkdigEngine.Extensions/TripleColon/TripleColonBlockParser.cs
+++ b/src/Microsoft.DocAsCode.MarkdigEngine.Extensions/TripleColon/TripleColonBlockParser.cs
@@ -69,7 +69,7 @@ public override BlockState TryOpen(BlockProcessor processor)
if (extension.GetType() == typeof(ImageExtension))
{
- if(htmlAttributes != null
+ if (htmlAttributes != null
&& !ImageExtension.RequiresClosingTripleColon(attributes))
{
return BlockState.None;
@@ -78,7 +78,8 @@ public override BlockState TryOpen(BlockProcessor processor)
processor.NewBlocks.Push(block);
block.EndingTripleColons = true;
return BlockState.ContinueDiscard;
- } else
+ }
+ else
{
processor.NewBlocks.Push(block);
}
@@ -96,7 +97,7 @@ public override BlockState TryContinue(BlockProcessor processor, Block block)
var slice = processor.Line;
var endingTripleColons = ((TripleColonBlock)block).EndingTripleColons;
- if(((TripleColonBlock)block).Extension.GetType() != typeof(ImageExtension)
+ if (((TripleColonBlock)block).Extension.GetType() != typeof(ImageExtension)
|| endingTripleColons)
{
if (processor.IsBlankLine)
diff --git a/src/Microsoft.DocAsCode.MarkdigEngine.Extensions/TripleColon/VideoExtension.cs b/src/Microsoft.DocAsCode.MarkdigEngine.Extensions/TripleColon/VideoExtension.cs
index 416cb50a7aa..42620b248cd 100644
--- a/src/Microsoft.DocAsCode.MarkdigEngine.Extensions/TripleColon/VideoExtension.cs
+++ b/src/Microsoft.DocAsCode.MarkdigEngine.Extensions/TripleColon/VideoExtension.cs
@@ -45,13 +45,13 @@ public bool TryProcessAttributes(IDictionary attributes, out Htm
logError("source is a required attribute. Please ensure you have specified a source attribute.");
return false;
}
- if(!src.Contains("channel9.msdn.com") &&
+ if (!src.Contains("channel9.msdn.com") &&
!src.Contains("youtube.com/embed") &&
!src.Contains("microsoft.com/en-us/videoplayer/embed"))
{
logWarning($"Video source, '{src}', should be from https://channel9.msdn.com, https://www.youtube.com/embed, or https://www.microsoft.com/en-us/videoplayer/embed");
}
- if(src.Contains("channel9.msdn.com") && !src.Contains("/player"))
+ if (src.Contains("channel9.msdn.com") && !src.Contains("/player"))
{
logWarning($"Your source from channel9.msdn.com does not end in '/player'. Please make sure you are correctly linking to the Channel 9 video player. ");
}
@@ -69,7 +69,7 @@ public bool TryProcessAttributes(IDictionary attributes, out Htm
if (!string.IsNullOrEmpty(maxWidth))
{
int number;
- if(!int.TryParse(maxWidth, out number))
+ if (!int.TryParse(maxWidth, out number))
{
logError($"Video reference '{src}' is invalid. 'max-width' must be a number.");
return false;
diff --git a/src/Microsoft.DocAsCode.MarkdigEngine.Extensions/Xref/XrefInlineParser.cs b/src/Microsoft.DocAsCode.MarkdigEngine.Extensions/Xref/XrefInlineParser.cs
index 5c1ebd30ffe..1f74abe7da7 100644
--- a/src/Microsoft.DocAsCode.MarkdigEngine.Extensions/Xref/XrefInlineParser.cs
+++ b/src/Microsoft.DocAsCode.MarkdigEngine.Extensions/Xref/XrefInlineParser.cs
@@ -35,15 +35,15 @@ public override bool Match(InlineProcessor processor, ref StringSlice slice)
c = slice.NextChar();
}
- while(c != startChar && c != '>')
+ while (c != startChar && c != '>')
{
href.Append(c);
c = slice.NextChar();
}
- if(startChar != '\0')
+ if (startChar != '\0')
{
- if(c != startChar)
+ if (c != startChar)
{
return false;
}
diff --git a/src/Microsoft.DocAsCode.MarkdigEngine.Validators/IMarkdownObjectValidator.cs b/src/Microsoft.DocAsCode.MarkdigEngine.Validators/IMarkdownObjectValidator.cs
index 99442ad0029..ee68a59ae7e 100644
--- a/src/Microsoft.DocAsCode.MarkdigEngine.Validators/IMarkdownObjectValidator.cs
+++ b/src/Microsoft.DocAsCode.MarkdigEngine.Validators/IMarkdownObjectValidator.cs
@@ -12,4 +12,4 @@ public interface IMarkdownObjectValidator
void Validate(IMarkdownObject markdownObject);
void PostValidate(IMarkdownObject markdownObject);
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.DocAsCode.MarkdigEngine.Validators/MarkdownLambdaObjectValidator.cs b/src/Microsoft.DocAsCode.MarkdigEngine.Validators/MarkdownLambdaObjectValidator.cs
index 62f6b86c5c8..563e4c16510 100644
--- a/src/Microsoft.DocAsCode.MarkdigEngine.Validators/MarkdownLambdaObjectValidator.cs
+++ b/src/Microsoft.DocAsCode.MarkdigEngine.Validators/MarkdownLambdaObjectValidator.cs
@@ -39,4 +39,4 @@ public void PostValidate(IMarkdownObject markdownObject)
{
_postAction?.Invoke(markdownObject);
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.DocAsCode.MarkdigEngine/MarkdigServiceProvider.cs b/src/Microsoft.DocAsCode.MarkdigEngine/MarkdigServiceProvider.cs
index f10ae0b1128..30eba8d000f 100644
--- a/src/Microsoft.DocAsCode.MarkdigEngine/MarkdigServiceProvider.cs
+++ b/src/Microsoft.DocAsCode.MarkdigEngine/MarkdigServiceProvider.cs
@@ -15,4 +15,4 @@ public IMarkdownService CreateMarkdownService(MarkdownServiceParameters paramete
{
return new MarkdigMarkdownService(parameters, Container, ConfigureMarkdig);
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.DocAsCode.Plugins/DefaultFileAbstractLayer.cs b/src/Microsoft.DocAsCode.Plugins/DefaultFileAbstractLayer.cs
index 60d520400ec..31dfaaf1549 100644
--- a/src/Microsoft.DocAsCode.Plugins/DefaultFileAbstractLayer.cs
+++ b/src/Microsoft.DocAsCode.Plugins/DefaultFileAbstractLayer.cs
@@ -63,4 +63,4 @@ public string GetOutputPhysicalPath(string file) =>
public IEnumerable GetExpectedPhysicalPath(string file) =>
new[] { Path.Combine(EnvironmentContext.OutputDirectory, file) };
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.DocAsCode.Plugins/FileAbstractLayerExtensions.cs b/src/Microsoft.DocAsCode.Plugins/FileAbstractLayerExtensions.cs
index 290bb1ac8be..4242cc25578 100644
--- a/src/Microsoft.DocAsCode.Plugins/FileAbstractLayerExtensions.cs
+++ b/src/Microsoft.DocAsCode.Plugins/FileAbstractLayerExtensions.cs
@@ -19,7 +19,7 @@ public static string[] ReadAllLines(this IFileAbstractLayer fal, string file)
using var reader = OpenReadText(fal, file);
string line;
var list = new List();
- while ((line = reader.ReadLine()) !=null)
+ while ((line = reader.ReadLine()) != null)
{
list.Add(line);
}
diff --git a/src/Microsoft.DocAsCode.Plugins/GroupInfo.cs b/src/Microsoft.DocAsCode.Plugins/GroupInfo.cs
index fee5a2b8a1a..e824c9f5e95 100644
--- a/src/Microsoft.DocAsCode.Plugins/GroupInfo.cs
+++ b/src/Microsoft.DocAsCode.Plugins/GroupInfo.cs
@@ -12,4 +12,4 @@ public class GroupInfo
public List XRefTags { get; set; }
public Dictionary Metadata { get; set; } = new Dictionary();
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.DocAsCode.Plugins/IFileAbstractLayer.cs b/src/Microsoft.DocAsCode.Plugins/IFileAbstractLayer.cs
index cc794783b45..e2fd748ac5f 100644
--- a/src/Microsoft.DocAsCode.Plugins/IFileAbstractLayer.cs
+++ b/src/Microsoft.DocAsCode.Plugins/IFileAbstractLayer.cs
@@ -26,4 +26,4 @@ public interface IFileAbstractLayer
string GetPhysicalPath(string file);
IEnumerable GetExpectedPhysicalPath(string file);
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.DocAsCode.Plugins/LinkSourceInfo.cs b/src/Microsoft.DocAsCode.Plugins/LinkSourceInfo.cs
index 295e2cf4ba9..4e94956f83e 100644
--- a/src/Microsoft.DocAsCode.Plugins/LinkSourceInfo.cs
+++ b/src/Microsoft.DocAsCode.Plugins/LinkSourceInfo.cs
@@ -9,4 +9,4 @@ public struct LinkSourceInfo
public string Anchor { get; set; }
public string SourceFile { get; set; }
public int LineNumber { get; set; }
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.DocAsCode.Plugins/Manifest.cs b/src/Microsoft.DocAsCode.Plugins/Manifest.cs
index 369900e22ed..95ac8a56a4e 100644
--- a/src/Microsoft.DocAsCode.Plugins/Manifest.cs
+++ b/src/Microsoft.DocAsCode.Plugins/Manifest.cs
@@ -100,7 +100,7 @@ private void FileCollectionChanged(object sender, NotifyCollectionChangedEventAr
RemoveItem(ofi.RelativePath, ofi);
ofi.PropertyChanged -= OutputFileInfoPropertyChanged;
}
- item.OutputFiles.CollectionChanged -= ManifestItemOutputChanged;
+ item.OutputFiles.CollectionChanged -= ManifestItemOutputChanged;
}
}
}
diff --git a/src/Microsoft.DocAsCode.Plugins/ManifestGroupInfo.cs b/src/Microsoft.DocAsCode.Plugins/ManifestGroupInfo.cs
index 1addcbb280b..1a31aee9ad6 100644
--- a/src/Microsoft.DocAsCode.Plugins/ManifestGroupInfo.cs
+++ b/src/Microsoft.DocAsCode.Plugins/ManifestGroupInfo.cs
@@ -30,4 +30,4 @@ public ManifestGroupInfo(GroupInfo groupInfo)
Destination = groupInfo.Destination;
Metadata = groupInfo.Metadata;
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.DocAsCode.Plugins/ManifestItemCollectionConverter.cs b/src/Microsoft.DocAsCode.Plugins/ManifestItemCollectionConverter.cs
index a214a3b8ac3..04915970bfe 100644
--- a/src/Microsoft.DocAsCode.Plugins/ManifestItemCollectionConverter.cs
+++ b/src/Microsoft.DocAsCode.Plugins/ManifestItemCollectionConverter.cs
@@ -15,7 +15,7 @@ public override bool CanConvert(Type objectType)
public override object ReadJson(JsonReader reader, Type objecType, object existingValue,
JsonSerializer serializer)
{
- var manifestCollectionList = (List) serializer.Deserialize(reader, typeof(List));
+ var manifestCollectionList = (List)serializer.Deserialize(reader, typeof(List));
if (existingValue != null)
{
((ManifestItemCollection)existingValue).AddRange(manifestCollectionList);
diff --git a/src/Microsoft.DocAsCode.Plugins/MarkupResult.cs b/src/Microsoft.DocAsCode.Plugins/MarkupResult.cs
index 2050f8d5235..1d4dc36e342 100644
--- a/src/Microsoft.DocAsCode.Plugins/MarkupResult.cs
+++ b/src/Microsoft.DocAsCode.Plugins/MarkupResult.cs
@@ -19,4 +19,4 @@ public MarkupResult Clone()
{
return (MarkupResult)MemberwiseClone();
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.DocAsCode.Plugins/RootedFileAbstractLayer.cs b/src/Microsoft.DocAsCode.Plugins/RootedFileAbstractLayer.cs
index 87c1a53d358..64f71588866 100644
--- a/src/Microsoft.DocAsCode.Plugins/RootedFileAbstractLayer.cs
+++ b/src/Microsoft.DocAsCode.Plugins/RootedFileAbstractLayer.cs
@@ -66,4 +66,4 @@ public string GetPhysicalPath(string file) =>
public IEnumerable GetExpectedPhysicalPath(string file) =>
Path.IsPathRooted(file) ? new[] { file } : _impl.GetExpectedPhysicalPath(file);
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.DocAsCode.Plugins/TreeNavigator.cs b/src/Microsoft.DocAsCode.Plugins/TreeNavigator.cs
index e884f43e1d7..2b270cfbcde 100644
--- a/src/Microsoft.DocAsCode.Plugins/TreeNavigator.cs
+++ b/src/Microsoft.DocAsCode.Plugins/TreeNavigator.cs
@@ -40,7 +40,7 @@ public bool MoveToChild(Func comparer)
return false;
}
- foreach(var item in _current.Items)
+ foreach (var item in _current.Items)
{
if (comparer(item.Current))
{
@@ -130,7 +130,7 @@ private bool MoveTo(NavigatorTreeItem node, Func comparer)
}
return false;
}
-
+
private class NavigatorTreeItem
{
public NavigatorTreeItem Parent { get; set; }
diff --git a/src/Microsoft.DocAsCode.YamlSerialization/NodeDeserializers/EmitGenericCollectionNodeDeserializer.cs b/src/Microsoft.DocAsCode.YamlSerialization/NodeDeserializers/EmitGenericCollectionNodeDeserializer.cs
index 7f1bb0dc8ea..58b74ae9c4b 100644
--- a/src/Microsoft.DocAsCode.YamlSerialization/NodeDeserializers/EmitGenericCollectionNodeDeserializer.cs
+++ b/src/Microsoft.DocAsCode.YamlSerialization/NodeDeserializers/EmitGenericCollectionNodeDeserializer.cs
@@ -20,7 +20,7 @@ public class EmitGenericCollectionNodeDeserializer : INodeDeserializer
{
private static readonly MethodInfo DeserializeHelperMethod =
typeof(EmitGenericCollectionNodeDeserializer).GetMethod(nameof(DeserializeHelper));
- private readonly IObjectFactory _objectFactory;
+ private readonly IObjectFactory _objectFactory;
private readonly Dictionary _gpCache =
new();
private readonly Dictionary, object>> _actionCache =
diff --git a/src/Microsoft.DocAsCode.YamlSerialization/NodeDeserializers/EmitGenericDictionaryNodeDeserializer.cs b/src/Microsoft.DocAsCode.YamlSerialization/NodeDeserializers/EmitGenericDictionaryNodeDeserializer.cs
index db8ad496652..53b9ce9f534 100644
--- a/src/Microsoft.DocAsCode.YamlSerialization/NodeDeserializers/EmitGenericDictionaryNodeDeserializer.cs
+++ b/src/Microsoft.DocAsCode.YamlSerialization/NodeDeserializers/EmitGenericDictionaryNodeDeserializer.cs
@@ -17,7 +17,7 @@ public class EmitGenericDictionaryNodeDeserializer : INodeDeserializer
{
private static readonly MethodInfo DeserializeHelperMethod =
typeof(EmitGenericDictionaryNodeDeserializer).GetMethod(nameof(DeserializeHelper));
- private readonly IObjectFactory _objectFactory;
+ private readonly IObjectFactory _objectFactory;
private readonly Dictionary _gpCache =
new();
private readonly Dictionary, Action, object>> _actionCache =
diff --git a/src/Microsoft.DocAsCode.YamlSerialization/ObjectGraphTraversalStrategies/FullObjectGraphTraversalStrategy.cs b/src/Microsoft.DocAsCode.YamlSerialization/ObjectGraphTraversalStrategies/FullObjectGraphTraversalStrategy.cs
index cd77d6590ef..f1a7c5fd077 100644
--- a/src/Microsoft.DocAsCode.YamlSerialization/ObjectGraphTraversalStrategies/FullObjectGraphTraversalStrategy.cs
+++ b/src/Microsoft.DocAsCode.YamlSerialization/ObjectGraphTraversalStrategies/FullObjectGraphTraversalStrategy.cs
@@ -270,4 +270,4 @@ private IObjectDescriptor GetObjectDescriptor(object value, Type staticType)
{
return new BetterObjectDescriptor(value, _typeResolver.Resolve(staticType, value), staticType);
}
-}
\ No newline at end of file
+}
diff --git a/src/Microsoft.DocAsCode.YamlSerialization/ObjectGraphTraversalStrategies/RoundtripObjectGraphTraversalStrategy.cs b/src/Microsoft.DocAsCode.YamlSerialization/ObjectGraphTraversalStrategies/RoundtripObjectGraphTraversalStrategy.cs
index 21352e93224..e5efa8360d0 100644
--- a/src/Microsoft.DocAsCode.YamlSerialization/ObjectGraphTraversalStrategies/RoundtripObjectGraphTraversalStrategy.cs
+++ b/src/Microsoft.DocAsCode.YamlSerialization/ObjectGraphTraversalStrategies/RoundtripObjectGraphTraversalStrategy.cs
@@ -33,4 +33,4 @@ protected override void TraverseProperties(IObjectDescriptor value, IO
base.TraverseProperties(value, visitor, currentDepth, context);
}
-}
\ No newline at end of file
+}
diff --git a/src/docfx/Models/DefaultCommand.cs b/src/docfx/Models/DefaultCommand.cs
index 6df0addd69e..8c3fc054a3a 100644
--- a/src/docfx/Models/DefaultCommand.cs
+++ b/src/docfx/Models/DefaultCommand.cs
@@ -16,7 +16,7 @@ internal class Options : BuildCommandOptions
{
[Description("Prints version information")]
[CommandOption("-v|--version")]
- public bool Version { get;set; }
+ public bool Version { get; set; }
}
public override int Execute(CommandContext context, Options options)
diff --git a/test/Microsoft.DocAsCode.Build.Common.Tests/MarkdownReaderTest.cs b/test/Microsoft.DocAsCode.Build.Common.Tests/MarkdownReaderTest.cs
index d67bd3824cb..8acc4a1c79c 100644
--- a/test/Microsoft.DocAsCode.Build.Common.Tests/MarkdownReaderTest.cs
+++ b/test/Microsoft.DocAsCode.Build.Common.Tests/MarkdownReaderTest.cs
@@ -30,7 +30,7 @@ public void TestReadMarkdownAsOverwrite()
File.WriteAllText(fullPath, content);
var host = new HostService(null, Enumerable.Empty())
{
- MarkdownService = new MarkdigServiceProvider().CreateMarkdownService(new MarkdownServiceParameters {BasePath = string.Empty}),
+ MarkdownService = new MarkdigServiceProvider().CreateMarkdownService(new MarkdownServiceParameters { BasePath = string.Empty }),
SourceFiles = ImmutableDictionary.Create()
};
diff --git a/test/Microsoft.DocAsCode.Build.Engine.Tests/DocumentBuilderTest.cs b/test/Microsoft.DocAsCode.Build.Engine.Tests/DocumentBuilderTest.cs
index 7777394fb01..f289286a7a4 100644
--- a/test/Microsoft.DocAsCode.Build.Engine.Tests/DocumentBuilderTest.cs
+++ b/test/Microsoft.DocAsCode.Build.Engine.Tests/DocumentBuilderTest.cs
@@ -217,7 +217,7 @@ public void TestBuild()
Assert.Equal("ConsoleColor", model[1].Items[1].Name);
Assert.Equal("../System.ConsoleColor.csyml", model[1].Items[1].Href);
}
-
+
{
// check conceptual.
var conceptualOutputPath = Path.Combine(_outputFolder, Path.ChangeExtension(conceptualFile, ".html"));
diff --git a/test/Microsoft.DocAsCode.Build.Engine.Tests/ExtractSearchIndexFromHtmlTest.cs b/test/Microsoft.DocAsCode.Build.Engine.Tests/ExtractSearchIndexFromHtmlTest.cs
index c19936a93f0..dc4e5f95745 100644
--- a/test/Microsoft.DocAsCode.Build.Engine.Tests/ExtractSearchIndexFromHtmlTest.cs
+++ b/test/Microsoft.DocAsCode.Build.Engine.Tests/ExtractSearchIndexFromHtmlTest.cs
@@ -109,7 +109,7 @@ Only index once.
html.LoadHtml(rawHtml);
var href = "http://dotnet.github.io/docfx";
var item = _extractor.ExtractItem(html, href);
- Assert.Equal(new SearchIndexItem { Href = href, Title = "This is title in head metadata", Keywords = "Only index once."}, item);
+ Assert.Equal(new SearchIndexItem { Href = href, Title = "This is title in head metadata", Keywords = "Only index once." }, item);
}
[Fact]
diff --git a/test/Microsoft.DocAsCode.Build.Engine.Tests/TemplateManagerUnitTest.cs b/test/Microsoft.DocAsCode.Build.Engine.Tests/TemplateManagerUnitTest.cs
index 18d5a6e36f6..db12f4b682b 100644
--- a/test/Microsoft.DocAsCode.Build.Engine.Tests/TemplateManagerUnitTest.cs
+++ b/test/Microsoft.DocAsCode.Build.Engine.Tests/TemplateManagerUnitTest.cs
@@ -452,9 +452,9 @@ public void TestMustacheTemplateWithScriptWithLongStringInModelShouldWork()
var model = new
{
model = new
- {
- name = longName,
- }
+ {
+ name = longName,
+ }
};
string inputFolder = null;
diff --git a/test/Microsoft.DocAsCode.Build.Engine.Tests/ValidateBookmarkTest.cs b/test/Microsoft.DocAsCode.Build.Engine.Tests/ValidateBookmarkTest.cs
index c3e8db3de84..cda07aef0d1 100644
--- a/test/Microsoft.DocAsCode.Build.Engine.Tests/ValidateBookmarkTest.cs
+++ b/test/Microsoft.DocAsCode.Build.Engine.Tests/ValidateBookmarkTest.cs
@@ -64,7 +64,7 @@ public void TestBasicFeature()
{
new HtmlPostProcessor
{
- Handlers = {new ValidateBookmark()}
+ Handlers = { new ValidateBookmark() }
}.Process(manifest, _outputFolder);
}
}
@@ -111,7 +111,7 @@ public void TestNoCheck()
{
new HtmlPostProcessor
{
- Handlers = {new ValidateBookmark()}
+ Handlers = { new ValidateBookmark() }
}.Process(manifest, _outputFolder);
}
}
diff --git a/test/Microsoft.DocAsCode.Build.Engine.Tests/XRefMapDownloaderTest.cs b/test/Microsoft.DocAsCode.Build.Engine.Tests/XRefMapDownloaderTest.cs
index 00fa8e0b323..799365c273c 100644
--- a/test/Microsoft.DocAsCode.Build.Engine.Tests/XRefMapDownloaderTest.cs
+++ b/test/Microsoft.DocAsCode.Build.Engine.Tests/XRefMapDownloaderTest.cs
@@ -29,10 +29,10 @@ public async Task ReadLocalXRefMapWithFallback()
var basePath = Path.GetRandomFileName();
var fallbackFolders = new List() { Path.Combine(Directory.GetCurrentDirectory(), "TestData") };
var xrefmaps = new List() { "xrefmap.yml" };
-
+
// Get fallback TestData/xrefmap.yml which contains uid: 'str'
var reader = await new XRefCollection(from u in xrefmaps
- select new Uri(u, UriKind.RelativeOrAbsolute)).GetReaderAsync(basePath, fallbackFolders);
+ select new Uri(u, UriKind.RelativeOrAbsolute)).GetReaderAsync(basePath, fallbackFolders);
var xrefSpec = reader.Find("str");
Assert.NotNull(xrefSpec);
diff --git a/test/Microsoft.DocAsCode.Build.ManagedReference.Tests/ManagedReferenceDocumentProcessorTest.cs b/test/Microsoft.DocAsCode.Build.ManagedReference.Tests/ManagedReferenceDocumentProcessorTest.cs
index cb5e52e6d2c..8b9049864d3 100644
--- a/test/Microsoft.DocAsCode.Build.ManagedReference.Tests/ManagedReferenceDocumentProcessorTest.cs
+++ b/test/Microsoft.DocAsCode.Build.ManagedReference.Tests/ManagedReferenceDocumentProcessorTest.cs
@@ -194,7 +194,7 @@ public void ProcessMrefWithDynamicDevLangsShouldSucceed()
{
FileCollection files = new(_defaultFiles);
files.RemoveAll(s => true);
- files.Add(DocumentType.Article, new [] { "TestData/mref/System.String.yml" }, "TestData/");
+ files.Add(DocumentType.Article, new[] { "TestData/mref/System.String.yml" }, "TestData/");
BuildDocument(files);
diff --git a/test/Microsoft.DocAsCode.Build.SchemaDriven.Tests/JsonPointerTest.cs b/test/Microsoft.DocAsCode.Build.SchemaDriven.Tests/JsonPointerTest.cs
index 6c07455a53b..2ca1573e0ff 100644
--- a/test/Microsoft.DocAsCode.Build.SchemaDriven.Tests/JsonPointerTest.cs
+++ b/test/Microsoft.DocAsCode.Build.SchemaDriven.Tests/JsonPointerTest.cs
@@ -8,7 +8,7 @@
using Xunit;
namespace Microsoft.DocAsCode.Build.SchemaDriven.Tests;
- public class JsonPointerTest : TestBase
+public class JsonPointerTest : TestBase
{
[Fact]
public void TestJsonPointerSpec()
diff --git a/test/Microsoft.DocAsCode.Build.SchemaDriven.Tests/SchemaDrivenProcessorTest.cs b/test/Microsoft.DocAsCode.Build.SchemaDriven.Tests/SchemaDrivenProcessorTest.cs
index ab936f2c152..7cc3bcf43b0 100644
--- a/test/Microsoft.DocAsCode.Build.SchemaDriven.Tests/SchemaDrivenProcessorTest.cs
+++ b/test/Microsoft.DocAsCode.Build.SchemaDriven.Tests/SchemaDrivenProcessorTest.cs
@@ -205,7 +205,7 @@ public void TestXrefResolver()
// arrange
var schemaFile = CreateFile("template/schemas/mref.test.schema.json", File.ReadAllText("TestData/schemas/mref.test.schema.json"), _templateFolder);
var templateXref = CreateFile(
- "template/partials/overview.tmpl", @"{{name}}:{{{summary}}}|{{#boolProperty}}{{intProperty}}{{/boolProperty}}|{{#monikers}}{{.}}{{/monikers}}",
+ "template/partials/overview.tmpl", @"{{name}}:{{{summary}}}|{{#boolProperty}}{{intProperty}}{{/boolProperty}}|{{#monikers}}{{.}}{{/monikers}}",
_templateFolder);
var templateFile = CreateFile("template/ManagedReference.html.tmpl", @"
{{#items}}
diff --git a/test/Microsoft.DocAsCode.Build.SchemaDriven.Tests/SchemaMergerTest.cs b/test/Microsoft.DocAsCode.Build.SchemaDriven.Tests/SchemaMergerTest.cs
index 6d5f852a392..e5b4c60383f 100644
--- a/test/Microsoft.DocAsCode.Build.SchemaDriven.Tests/SchemaMergerTest.cs
+++ b/test/Microsoft.DocAsCode.Build.SchemaDriven.Tests/SchemaMergerTest.cs
@@ -235,7 +235,7 @@ Overwrite with content
var rawModelFilePath = GetRawModelFilePath(inputFileName);
Assert.True(File.Exists(rawModelFilePath));
var rawModel = JsonUtility.Deserialize(rawModelFilePath);
-
+
Assert.Equal("Hello world!", rawModel["meta"].Value());
Assert.Equal(2, rawModel["intValue"].Value());
Assert.Equal("string1", rawModel["stringValue"].Value());
diff --git a/test/Microsoft.DocAsCode.Build.TableOfContents.Tests/TocDocumentProcessorTest.cs b/test/Microsoft.DocAsCode.Build.TableOfContents.Tests/TocDocumentProcessorTest.cs
index 0994ee44636..d5fce11d0b4 100644
--- a/test/Microsoft.DocAsCode.Build.TableOfContents.Tests/TocDocumentProcessorTest.cs
+++ b/test/Microsoft.DocAsCode.Build.TableOfContents.Tests/TocDocumentProcessorTest.cs
@@ -569,7 +569,7 @@ public void ProcessMarkdownTocWithNonExistentReferencedTocShouldLogError()
var files = new FileCollection(_inputFolder);
files.Add(DocumentType.Article, new[] { toc });
- var listener = TestLoggerListener.CreateLoggerListenerWithCodesFilter(new List { WarningCodes.Build.InvalidTocInclude});
+ var listener = TestLoggerListener.CreateLoggerListenerWithCodesFilter(new List { WarningCodes.Build.InvalidTocInclude });
Logger.RegisterListener(listener);
using (new LoggerPhaseScope(nameof(TocDocumentProcessorTest)))
{
@@ -838,7 +838,7 @@ public void UrlDecodeHrefInYamlToc()
href: a%20b.md";
var files = new FileCollection(_inputFolder);
var tocFile = _fileCreator.CreateFile(tocContent, FileType.YamlToc);
- var markdownFile = _fileCreator.CreateFile(string.Empty, FileType.MarkdownContent, fileNameWithoutExtension:"a b");
+ var markdownFile = _fileCreator.CreateFile(string.Empty, FileType.MarkdownContent, fileNameWithoutExtension: "a b");
files.Add(DocumentType.Article, new[] { tocFile, markdownFile });
// Act
diff --git a/test/Microsoft.DocAsCode.Common.Tests/GitUtilityTest.cs b/test/Microsoft.DocAsCode.Common.Tests/GitUtilityTest.cs
index 16e1bff13c2..397c5d76e07 100644
--- a/test/Microsoft.DocAsCode.Common.Tests/GitUtilityTest.cs
+++ b/test/Microsoft.DocAsCode.Common.Tests/GitUtilityTest.cs
@@ -8,7 +8,7 @@
namespace Microsoft.DocAsCode.Common.Tests;
[Collection("docfx STA")]
- public class GitUtilityTest : IDisposable
+public class GitUtilityTest : IDisposable
{
private string _originalBranchName;
private const string envName = "DOCFX_SOURCE_BRANCH_NAME";
diff --git a/test/Microsoft.DocAsCode.Dotnet.Tests/GenerateMetadataFromCSUnitTest.cs b/test/Microsoft.DocAsCode.Dotnet.Tests/GenerateMetadataFromCSUnitTest.cs
index 91a698ec0af..4e56291a5f8 100644
--- a/test/Microsoft.DocAsCode.Dotnet.Tests/GenerateMetadataFromCSUnitTest.cs
+++ b/test/Microsoft.DocAsCode.Dotnet.Tests/GenerateMetadataFromCSUnitTest.cs
@@ -524,7 +524,7 @@ public interface IFooBar : IFoo, IBar { }
new[] { "Foo", "<", "string", "[", "]", ">" },
item.NameWithTypeParts[SyntaxLanguage.CSharp].Select(p => p.DisplayName));
Assert.Equal(
- new[] { "Test1", ".", "Foo", "<", "string", "[","]", ">" },
+ new[] { "Test1", ".", "Foo", "<", "string", "[", "]", ">" },
item.QualifiedNameParts[SyntaxLanguage.CSharp].Select(p => p.DisplayName));
}
}
diff --git a/test/Microsoft.DocAsCode.Glob.Tests/GlobFileTest.cs b/test/Microsoft.DocAsCode.Glob.Tests/GlobFileTest.cs
index c391be5c5f3..8ab14448755 100644
--- a/test/Microsoft.DocAsCode.Glob.Tests/GlobFileTest.cs
+++ b/test/Microsoft.DocAsCode.Glob.Tests/GlobFileTest.cs
@@ -50,8 +50,8 @@ public void TestGlobGetFilesShouldAbleToGetFiles()
};
CreateFilesOrFolders(_workingDirectory, files);
var result = FileGlob.GetFiles(
- _workingDirectory,
- new string[] { "**.md" },
+ _workingDirectory,
+ new string[] { "**.md" },
null).ToArray();
Assert.Equal(3, result.Length);
result = FileGlob.GetFiles(
@@ -84,7 +84,7 @@ public void TestGlobGetFilesShouldAbleToGetFiles()
private static void CreateFilesOrFolders(string cwd, params string[] items)
{
if (string.IsNullOrEmpty(cwd)) cwd = ".";
- foreach(var i in items)
+ foreach (var i in items)
{
var item = cwd + "/" + i;
if (item.EndsWith("/"))
diff --git a/test/Microsoft.DocAsCode.Glob.Tests/GlobMatcherTest.cs b/test/Microsoft.DocAsCode.Glob.Tests/GlobMatcherTest.cs
index 29f9cf49f1a..9f98b7ea369 100644
--- a/test/Microsoft.DocAsCode.Glob.Tests/GlobMatcherTest.cs
+++ b/test/Microsoft.DocAsCode.Glob.Tests/GlobMatcherTest.cs
@@ -25,7 +25,7 @@ public void TestNegateGlobShouldAllowMultipleNegateChars(string pattern, bool ex
[InlineData("a{b,c}d", new string[] { "abd", "acd" })]
[InlineData("a{b,c,d}e{d}{}", new string[] { "abed", "aced", "aded" })]
[InlineData("{{a,b}}", new string[] { "a", "b" })]
- [InlineData("z{a,b{,c}d", new string[] { } )]
+ [InlineData("z{a,b{,c}d", new string[] { })]
[InlineData(@"a\{b,c}d", new string[] { })]
public void TestGroupedGlobShouldExpand(string source, string[] expected)
{
@@ -44,7 +44,7 @@ public void TestGroupedGlobShouldExpand(string source, string[] expected)
{
"a"
}, true)]
- [InlineData("a*", new string[]
+ [InlineData("a*", new string[]
{
"a", "abc", "abd", "abe"
}, true)]
@@ -61,7 +61,7 @@ public void TestGroupedGlobShouldExpand(string source, string[] expected)
"b/a/a/a/b.cs"
}, true)]
// ** is a shortcut for **/*
- [InlineData("**", new string[]
+ [InlineData("**", new string[]
{
"a", "b", "abc", "bdir/cfile"
}, true)]
@@ -202,7 +202,7 @@ public void TestGroupedGlobShouldExpand(string source, string[] expected)
public void TestGlobMatchWithoutDotMatchShouldMatchNonDotFiles(string pattern, string[] files, bool expected)
{
var glob = new GlobMatcher(pattern);
- foreach(var file in files)
+ foreach (var file in files)
{
var match = glob.Match(file);
Assert.Equal(expected, match);
diff --git a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/ChromelessFormsTest.cs b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/ChromelessFormsTest.cs
index c9a8e1b1c9f..9fb690d000a 100644
--- a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/ChromelessFormsTest.cs
+++ b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/ChromelessFormsTest.cs
@@ -107,4 +107,4 @@ public void ChromelessFormsTestMultipleForms()
TestUtility.VerifyMarkup(content, expected);
}
-}
\ No newline at end of file
+}
diff --git a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/CodeSnippetTest.cs b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/CodeSnippetTest.cs
index 9fa4bd9a47e..e313b0aceb3 100644
--- a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/CodeSnippetTest.cs
+++ b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/CodeSnippetTest.cs
@@ -152,7 +152,7 @@ public void NotebookCodeSnippetMultipleTagFound()
TestUtility.VerifyMarkup(
source,
expected,
- errors: new[] { "multiple-tags-with-same-name"},
+ errors: new[] { "multiple-tags-with-same-name" },
files: new Dictionary
{
{ "Program.ipynb", content },
diff --git a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/CodeTest.cs b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/CodeTest.cs
index 401ad1da7a1..82f6dc73d25 100644
--- a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/CodeTest.cs
+++ b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/CodeTest.cs
@@ -1860,7 +1860,7 @@ public void CodeTestBlockGeneral(string source, string expected)
{
{ filename, content }
});
-
+
}
[Theory]
@@ -1892,7 +1892,8 @@ public void CodeTestBlockGeneralCSharp_Error(string source)
{
filename = "source.crazy";
content = contentCrazy;
- } else
+ }
+ else
{
filename = "source.missing";
content = string.Empty;
@@ -1901,7 +1902,7 @@ public void CodeTestBlockGeneralCSharp_Error(string source)
// act
// assert
- TestUtility.VerifyMarkup(source, null, errors:new string[] { "invalid-code" }, files: new Dictionary
+ TestUtility.VerifyMarkup(source, null, errors: new string[] { "invalid-code" }, files: new Dictionary
{
{ filename, content }
});
diff --git a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/MathematicsTest.cs b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/MathematicsTest.cs
index 3f4ff6fb5c9..bdaebb9f2e5 100644
--- a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/MathematicsTest.cs
+++ b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/MathematicsTest.cs
@@ -7,7 +7,7 @@ namespace Microsoft.DocAsCode.MarkdigEngine.Tests;
public class MathematicsTest
{
- [Fact(Skip ="Disable math support")]
+ [Fact(Skip = "Disable math support")]
public void Test_Mathematics_Support_0()
{
var source = "$ math inline $";
@@ -16,7 +16,7 @@ public void Test_Mathematics_Support_0()
TestUtility.VerifyMarkup(source, expected);
}
- [Fact(Skip ="Disable math support")]
+ [Fact(Skip = "Disable math support")]
public void Test_Mathematics_Support_1()
{
var source = "$ math^0 **inline** $";
diff --git a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/NolocTest.cs b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/NolocTest.cs
index a6a12556c30..5ede6750a10 100644
--- a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/NolocTest.cs
+++ b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/NolocTest.cs
@@ -30,7 +30,7 @@ public void NolocTest_Invalid()
// MultipleLines
TestUtility.VerifyMarkup(
@":::no-loc text=""I am crossing\
-a line"":::",
+a line"":::",
@":::no-loc text="I am crossing
a line":::
");
// Spaces not exactly match
diff --git a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/RowsTest.cs b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/RowsTest.cs
index e3432664af7..38f7bec8317 100644
--- a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/RowsTest.cs
+++ b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/RowsTest.cs
@@ -199,4 +199,4 @@ This is where your content goes.
";
TestUtility.VerifyMarkup(source, expected, lineNumber: true, filePath: "Topic.md");
}
-}
\ No newline at end of file
+}
diff --git a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/VideoTest.cs b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/VideoTest.cs
index 3065b1eeb42..6a679fb9901 100644
--- a/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/VideoTest.cs
+++ b/test/Microsoft.DocAsCode.MarkdigEngine.Extensions.Tests/VideoTest.cs
@@ -32,7 +32,7 @@ public void VideoTestBlockGeneral(string source, string expected)
{
TestUtility.VerifyMarkup(source, expected);
}
-
+
[Theory]
[InlineData(@":::video source="""" title=""My title"":::", @":::video source="" title="My title":::
")]
diff --git a/test/Microsoft.DocAsCode.MarkdigEngine.Tests/TestUtility/TestLoggerListener.cs b/test/Microsoft.DocAsCode.MarkdigEngine.Tests/TestUtility/TestLoggerListener.cs
index 5665900612b..5ad93a7ab39 100644
--- a/test/Microsoft.DocAsCode.MarkdigEngine.Tests/TestUtility/TestLoggerListener.cs
+++ b/test/Microsoft.DocAsCode.MarkdigEngine.Tests/TestUtility/TestLoggerListener.cs
@@ -53,4 +53,4 @@ public static TestLoggerListener CreateLoggerListenerWithPhaseEqualFilter(string
return false;
});
}
-}
\ No newline at end of file
+}
diff --git a/test/Microsoft.DocAsCode.MarkdigEngine.Tests/ValidationTest.cs b/test/Microsoft.DocAsCode.MarkdigEngine.Tests/ValidationTest.cs
index d2e4d74b357..b23ca7003c5 100644
--- a/test/Microsoft.DocAsCode.MarkdigEngine.Tests/ValidationTest.cs
+++ b/test/Microsoft.DocAsCode.MarkdigEngine.Tests/ValidationTest.cs
@@ -17,7 +17,7 @@ public class ValidationTest
{
public const string MarkdownValidatePhaseName = "Markdown style";
- private readonly MarkdownContext DefaultContext =
+ private readonly MarkdownContext DefaultContext =
new(
null,
(code, message, origin, line) => Logger.LogInfo(message, null, null, line.ToString(), code),
@@ -221,7 +221,7 @@ public void TestHtmlInlineTagValidation()
Behavior = TagValidationBehavior.Warning,
},
});
-
+
var listener = TestLoggerListener.CreateLoggerListenerWithPhaseEqualFilter(MarkdownValidatePhaseName);
using (new LoggerPhaseScope(MarkdownValidatePhaseName))
{
diff --git a/test/Microsoft.DocAsCode.MarkdigEngine.Tests/YamlHeaderTest.cs b/test/Microsoft.DocAsCode.MarkdigEngine.Tests/YamlHeaderTest.cs
index 39784989f27..0ae71d55325 100644
--- a/test/Microsoft.DocAsCode.MarkdigEngine.Tests/YamlHeaderTest.cs
+++ b/test/Microsoft.DocAsCode.MarkdigEngine.Tests/YamlHeaderTest.cs
@@ -54,7 +54,7 @@ public void TestDfmYamlHeader_YamlUtilityReturnNull()
var marked = SimpleMarkup(source);
Assert.Equal(expected.Replace("\r\n", "\n"), marked.Html);
}
-
+
[Fact]
public void TestDfmYamlHeader_General()
{
diff --git a/test/docfx.Tests/CompositeCommandTest.cs b/test/docfx.Tests/CompositeCommandTest.cs
index 098fd7d8cc8..37094e28e2f 100644
--- a/test/docfx.Tests/CompositeCommandTest.cs
+++ b/test/docfx.Tests/CompositeCommandTest.cs
@@ -111,7 +111,7 @@ public class HelloWorld {}}
XDocument xdoc = XDocument.Load(sitemap);
- var documentElement = xdoc.Elements().FirstOrDefault();
+ var documentElement = xdoc.Elements().FirstOrDefault();
Assert.NotNull(documentElement);
var ns = "http://www.sitemaps.org/schemas/sitemap/0.9";
Assert.Equal(ns, documentElement.GetDefaultNamespace());
diff --git a/test/docfx.Tests/JsonConverterTest.cs b/test/docfx.Tests/JsonConverterTest.cs
index 68e4a2c03b2..195cb878db4 100644
--- a/test/docfx.Tests/JsonConverterTest.cs
+++ b/test/docfx.Tests/JsonConverterTest.cs
@@ -171,7 +171,8 @@ protected override JsonProperty CreateProperty(MemberInfo member,
&& !typeof(string).IsAssignableFrom(property.PropertyType)
&& typeof(IEnumerable).IsAssignableFrom(property.PropertyType))
{
- Predicate