Adding XML formatting #1330
validate_pull_request.yml
on: pull_request
Run Tests
59s
Check Formatting
13s
Test CSharpier.MSBuild
1m 15s
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>
" has a length of 501, differs near " At" (index 237).
|
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>
<LangVersion4>
</PropertyGroup>
</Project>
" has a length of 101, differs near "4>
" (index 68).
|
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 >
</Root>
" has a length of 35, differs near " co" (index 15).
|
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
>
</PropertyGroup>
</Project>
" has a length of 349, differs near " " (index 123).
|
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""></DoubleQuotesForce>
" with a length of 67, but "<DoubleQuotesForce Attribute="SomeText""></DoubleQuotesForce>
" has a length of 62, differs near """>" (index 38).
|
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>
</Reference>
<AspNetCoreShippingAssembly Include="Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.SomeLongerName" />
</Project>
" has a length of 382, differs near "..\" (index 163).
|
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><b>SomeText</b></ElementWithEncodedText>
</Root>
" with a length of 610, but "<Root>
<Element />
<Element></Element>
<ElementWithTextText>
<LongElement____________________________________________TextValue>
<ElementWithAttribute Attribute="AttributeValue________________"TextValue>
<ElementWithAttribute Attribute="AttributeValue_________________"TextValue>
<ElementWithAttribute Attribute="AttributeValue__________________"TextValue>
<ElementWithEncodedText<b>SomeText</b>>
</Root>
" has a length of 432, differs near "Tex" (index 61).
|
EncodedLineEnding:
Src/CSharpier.Tests/obj/Release/net9.0/generated/CSharpier.Tests.Generators/CSharpier.Tests.Generators.FormattingTestsGenerator/FormattingTests_xml.cs#L52
Expected normalizedCode to be "<Project>
<Error Text="@('', '
')" />
</Project>" with a length of 55, but "<Project>
<Error Text="@('', '
')" />
</Project>
" has a length of 51, differs near "
')" (index 32).
|
LongAttributes:
Src/CSharpier.Tests/obj/Release/net9.0/generated/CSharpier.Tests.Generators/CSharpier.Tests.Generators.FormattingTestsGenerator/FormattingTests_xml.cs#L57
Expected normalizedCode to be "<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target
Name="CoreCompile"
Inputs="$(MSBuildAllProjects);
@(Compile);
@(_CoreCompileResourceInputs);
$(ApplicationIcon);
$(AssemblyOriginatorKeyFile);
@(ReferencePath);
@(CompiledLicenseFile);
@(LinkResource);
@(EmbeddedDocumentation);
$(Win32Resource);
$(Win32Manifest);
@(CustomAdditionalCompileInputs);
$(ResolvedCodeAnalysisRuleSet)"
Outputs="@(DocFileItem);
@(IntermediateAssembly);
@(_DebugSymbolsIntermediatePath);
$(NonExistentFile);
@(CustomAdditionalCompileOutputs)"
Returns="@(CscCommandLineArgs)"
DependsOnTargets="$(CoreCompileDependsOn)"
>
<Csc
Condition=" '%(_CoreCompileResourceInputs.WithCulture)' != 'true' "
AdditionalLibPaths="$(AdditionalLibPaths)"
AddModules="@(AddModules)"
AdditionalFiles="@(AdditionalFiles)"
AllowUnsafeBlocks="$(AllowUnsafeBlocks)"
Analyzers="@(Analyzer)"
ApplicationConfiguration="$(AppConfigForCompiler)"
BaseAddress="$(BaseAddress)"
CheckForOverflowUnderflow="$(CheckForOverflowUnderflow)"
ChecksumAlgorithm="$(ChecksumAlgorithm)"
CodeAnalysisRuleSet="$(ResolvedCodeAnalysisRuleSet)"
CodePage="$(CodePage)"
DebugType="$(DebugType)"
DefineConstants="$(DefineConstants)"
DelaySign="$(DelaySign)"
DisabledWarnings="$(NoWarn)"
DocumentationFile="@(DocFileItem)"
EmitDebugInformation="$(DebugSymbols)"
EnvironmentVariables="$(CscEnvironment)"
ErrorEndLocation="$(ErrorEndLocation)"
ErrorLog="$(ErrorLog)"
ErrorReport="$(ErrorReport)"
Features="$(Features)"
FileAlignment="$(FileAlignment)"
GenerateFullPaths="$(GenerateFullPaths)"
HighEntropyVA="$(HighEntropyVA)"
KeyContainer="$(KeyContainerName)"
KeyFile="$(KeyOriginatorFile)"
LangVersion="$(LangVersion)"
LinkResources="@(LinkResource)"
MainEntryPoint="$(StartupObject)"
ModuleAssemblyName="$(ModuleAssemblyName)"
NoConfig="true"
NoLogo="$(NoLogo)"
NoStandardLib="$(NoCompilerStandardLib)"
NoWin32Manifest="$(NoWin32Manifest)"
Optimize="$(Optimize)"
Deterministic="$(Deterministic)"
PublicSign="$(PublicSign)"
OutputAssembly="@(IntermediateAssembly)"
PdbFile="$(PdbFile)"
Platform="$(PlatformTarget)"
Prefer32Bit="$(Prefer32Bit)"
PreferredUILang="$(PreferredUILang)"
ProvideCommandLineArgs="$(ProvideCommandLineArgs)"
References="@(ReferencePath)"
ReportAnalyzer="$(ReportAnalyzer)"
Resources="@(_CoreCompileResourceInputs);@(CompiledLicenseFile)"
ResponseFiles="$(CompilerResponseFile)"
RuntimeMetadataVersion="$(RuntimeMetadataVersion)"
SkipCompilerExecution="$(SkipCompilerExecution)"
Sources="@(Compile)"
SubsystemVersion="$(SubsystemVersion)"
TargetType="$(OutputType)"
ToolExe="$(CscToolExe)"
ToolPath="$(CscToolPath)"
TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
UseHostCompilerIfAvailable="$(UseHostCompilerIfAvailable)"
UseSharedCompilation="$(UseSharedCompilation)"
Utf8Output="$(Utf8Output)"
VsSessionGuid="$(VsSessionGuid)"
WarningLevel="$(WarningLevel)"
WarningsAsErrors="$(WarningsAsErrors)"
WarningsNotAsErrors="$(WarningsNotAsErrors)"
Win32Icon="$(ApplicationIcon)"
Win32Manifest="$(Win32Manifest)"
Win32Resource="$(Win32Resource)"
PathMap="$(PathMap)"
>
<Output TaskParameter="CommandLineArgs" ItemName="CscCommandLineArgs" />
</Csc>
</Target>
</Project>
" with a length of 3853, but "<{http://schemas.microsoft.com/developer/msbuild/2003}Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<{http://schemas.microsoft.com/developer/msbuild/2003}Tar
|
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>
" has a length of 20, differs near "Pro" (index 1).
|
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/
|