Skip to content

Adding XML formatting #1329

Adding XML formatting

Adding XML formatting #1329

Triggered via pull request November 18, 2024 23:56
Status Failure
Total duration 1m 15s
Artifacts

validate_pull_request.yml

on: pull_request
Run Tests
1m 1s
Run Tests
Check Formatting
12s
Check Formatting
Test CSharpier.MSBuild
1m 6s
Test CSharpier.MSBuild
Fit to window
Zoom out
Zoom in

Annotations

11 errors and 6 warnings
Check Formatting
Process completed with exit code 1.
Attributes: Src/CSharpier.Tests/obj/Release/net9.0/generated/CSharpier.Tests.Generators/CSharpier.Tests.Generators.FormattingTestsGenerator/FormattingTests_xml.cs#L12
Expected normalizedCode to be "<Root> <Element Attribute="Value" /> <Element Attribute1____________________="Value" Attribute2____________________="Value" Attribute3____________________="Value" Attribute4____________________="Value" /> <Element AttributeWithLineBreaks=" '$(MSBuildProjectName)' != 'Microsoft.TestCommon' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetCore.Test' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetStandard.Test' " /> </Root> " with a length of 507, but "<Root > <Element Attribute="Value" /> <Element Attribute1____________________="Value" Attribute2____________________="Value" Attribute3____________________="Value" Attribute4____________________="Value" /> <Element AttributeWithLineBreaks=" '$(MSBuildProjectName)' != 'Microsoft.TestCommon' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetCore.Test' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetStandard.Test' " /> </<Root> <Element Attribute="Value" /> <Element Attribute1____________________="Value" Attribute2____________________="Value" Attribute3____________________="Value" Attribute4____________________="Value" /> <Element AttributeWithLineBreaks=" '$(MSBuildProjectName)' != 'Microsoft.TestCommon' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetCore.Test' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetStandard.Test' " /> </Root> > </ " has a length of 1006, differs near " " (index 5).
BasicProject: Src/CSharpier.Tests/obj/Release/net9.0/generated/CSharpier.Tests.Generators/CSharpier.Tests.Generators.FormattingTestsGenerator/FormattingTests_xml.cs#L17
Expected normalizedCode to be "<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <LangVersion>4</LangVersion> </PropertyGroup> </Project> " with a length of 115, but "<Project Sdk="Microsoft.NET.Sdk" > <PropertyGroup > <LangVersion >4</<LangVersion>4</LangVersion>> </<PropertyGroup> <LangVersion>4</LangVersion> </PropertyGroup> > </<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <LangVersion>4</LangVersion> </PropertyGroup> </Project> > </ " has a length of 325, differs near " " (index 32).
CData: Src/CSharpier.Tests/obj/Release/net9.0/generated/CSharpier.Tests.Generators/CSharpier.Tests.Generators.FormattingTestsGenerator/FormattingTests_xml.cs#L22
Expected normalizedCode to be "<Root> <CData> <![CDATA[ contents ]]> </CData> </Root> " with a length of 63, but "<Root > <CData > contents </<CData> <![CDATA[ contents ]]> </CData> > </<Root> <CData> <![CDATA[ contents ]]> </CData> </Root> > </ " has a length of 177, differs near " " (index 5).
Comments: Src/CSharpier.Tests/obj/Release/net9.0/generated/CSharpier.Tests.Generators/CSharpier.Tests.Generators.FormattingTestsGenerator/FormattingTests_xml.cs#L27
Expected normalizedCode to be "<!-- comment --> <Root> <!-- comment --> </Root> " with a length of 51, but "<!-- comment --> <Root > <!-- comment --> </<Root> <!-- comment --> </Root> > </ " has a length of 95, differs near " <R" (index 17).
DoubleQuotesForced: Src/CSharpier.Tests/obj/Release/net9.0/generated/CSharpier.Tests.Generators/CSharpier.Tests.Generators.FormattingTestsGenerator/FormattingTests_xml.cs#L42
Expected normalizedCode to be "<DoubleQuotesForce Attribute="SomeText&quot;"></DoubleQuotesForce> " with a length of 67, but "<DoubleQuotesForce Attribute="SomeText"" ></<DoubleQuotesForce Attribute="SomeText&quot;"></DoubleQuotesForce>> </ " has a length of 118, differs near " " (index 18).
DoNotBreak: Src/CSharpier.Tests/obj/Release/net9.0/generated/CSharpier.Tests.Generators/CSharpier.Tests.Generators.FormattingTestsGenerator/FormattingTests_xml.cs#L37
Expected normalizedCode to be "<Project> <Reference Include="Newtonsoft.Json.Bson, Version=1.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <HintPath>..\..\packages\Newtonsoft.Json.Bson.1.0.2\lib\net45\Newtonsoft.Json.Bson.dll</HintPath> </Reference> <AspNetCoreShippingAssembly Include="Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.SomeLongerName" /> </Project> " with a length of 393, but "<Project > <Reference Include="Newtonsoft.Json.Bson, Version=1.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL" > <HintPath >..\..\packages\Newtonsoft.Json.Bson.1.0.2\lib\net45\Newtonsoft.Json.Bson.dll</<HintPath>..\..\packages\Newtonsoft.Json.Bson.1.0.2\lib\net45\Newtonsoft.Json.Bson.dll</HintPath> > </<Reference Include="Newtonsoft.Json.Bson, Version=1.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <HintPath>..\..\packages\Newtonsoft.Json.Bson.1.0.2\lib\net45\Newtonsoft.Json.Bson.dll</HintPath> </Reference> > <AspNetCoreShippingAssembly Include="Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.SomeLongerName" /> </<Project> <Reference Include="Newtonsoft.Json.Bson, Version=1.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <HintPath>..\..\packages\Newtonsoft.Json.Bson.1.0.2\lib\net45\Newtonsoft.Json.Bson.dll</HintPath> </Reference> <AspNetCoreShippingAssembly Include="Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.SomeLongerName" /> </Project> > </ " has a length of 1161, differs near " " (index 8).
Conditions: Src/CSharpier.Tests/obj/Release/net9.0/generated/CSharpier.Tests.Generators/CSharpier.Tests.Generators.FormattingTestsGenerator/FormattingTests_xml.cs#L32
Expected normalizedCode to be "<Project> <PropertyGroup> <TargetFrameworkVersion Condition=" '$(MSBuildProjectName)' != 'Microsoft.TestCommon' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetCore.Test' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetStandard.Test' " >v4.5.2</TargetFrameworkVersion > </PropertyGroup> </Project> " with a length of 374, but "<Project > <PropertyGroup > <TargetFrameworkVersion Condition=" '$(MSBuildProjectName)' != 'Microsoft.TestCommon' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetCore.Test' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetStandard.Test' " >v4.5.2</<TargetFrameworkVersion Condition=" '$(MSBuildProjectName)' != 'Microsoft.TestCommon' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetCore.Test' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetStandard.Test' ">v4.5.2</TargetFrameworkVersion> > </<PropertyGroup> <TargetFrameworkVersion Condition=" '$(MSBuildProjectName)' != 'Microsoft.TestCommon' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetCore.Test' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetStandard.Test' ">v4.5.2</TargetFrameworkVersion> </PropertyGroup> > </<Project> <PropertyGroup> <TargetFrameworkVersion Condition=" '$(MSBuildProjectName)' != 'Microsoft.TestCommon' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetCore.Test' AND '$(MSBuildProjectName)' != 'System.Net.Http.Formatting.NetStandard.Test' ">v4.5.2</TargetFrameworkVersion> </PropertyGroup> </Project> > </ " has a length of 1340, differs near " " (index 8).
RetainXmlElement: Src/CSharpier.Tests/obj/Release/net9.0/generated/CSharpier.Tests.Generators/CSharpier.Tests.Generators.FormattingTestsGenerator/FormattingTests_xml.cs#L62
Expected normalizedCode to be "<?xml version="1.0" encoding="utf-8"?> <Project></Project> " with a length of 59, but "> <Project ></<Project></Project>> </ " has a length of 39, differs near "> <" (index 0).
Elements: Src/CSharpier.Tests/obj/Release/net9.0/generated/CSharpier.Tests.Generators/CSharpier.Tests.Generators.FormattingTestsGenerator/FormattingTests_xml.cs#L47
Expected normalizedCode to be "<Root> <Element /> <Element></Element> <ElementWithText>Text</ElementWithText> <LongElement____________________________________________>TextValue</LongElement____________________________________________> <ElementWithAttribute Attribute="AttributeValue________________">TextValue</ElementWithAttribute> <ElementWithAttribute Attribute="AttributeValue_________________">TextValue</ElementWithAttribute> <ElementWithAttribute Attribute="AttributeValue__________________" >TextValue</ElementWithAttribute > <ElementWithEncodedText>&lt;b&gt;SomeText&lt;/b&gt;</ElementWithEncodedText> </Root> " with a length of 610, but "<Root > <Element /> <Element ></<Element></Element>> <ElementWithText >Text</<ElementWithText>Text</ElementWithText>> <LongElement____________________________________________ >TextValue</<LongElement____________________________________________>TextValue</LongElement____________________________________________> > <ElementWithAttribute Attribute="AttributeValue________________" >TextValue</<ElementWithAttribute Attribute="AttributeValue________________">TextValue</ElementWithAttribute> > <ElementWithAttribute Attribute="AttributeValue_________________" >TextValue</<ElementWithAttribute Attribute="AttributeValue_________________">TextValue</ElementWithAttribute> > <ElementWithAttribute Attribute="AttributeValue__________________" >TextValue</<ElementWithAttribute Attribute="AttributeValue__________________">TextValue</ElementWithAttribute> > <ElementWithEncodedText >&lt;b&gt;SomeText&lt;/b&gt;</<ElementWithEncodedText>&lt;b&gt;SomeText&lt;/b&gt;</ElementWithEncodedText> > </<Root> <Element /> <Element></Element> <ElementWithText>Text</ElementWithText> <LongElement____________________________________________>TextValue</LongElement____________________________________________> <ElementWithAttribute Attribute="AttributeValue________________">TextValue</ElementWithAttribute> <ElementWithAttribute Attribute="AttributeValue_________________">TextValue</ElementWithAttribute> <ElementWithAttribute Attribute="AttributeValue__________________">TextValue</ElementWithAttribute> <ElementWithEncodedText>&lt;b&gt;SomeText&lt;/b&gt;</ElementWithEncodedText> </Root> > </ " has a length of 1692, differs near " " (index 5).
Check Formatting
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Check Formatting
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v2, actions/setup-dotnet@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Run Tests
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Run Tests
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v2, actions/setup-dotnet@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Test CSharpier.MSBuild
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Test CSharpier.MSBuild
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v2, actions/setup-dotnet@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/