.NET project file analyzers community

Proj1700: Indent XML

As Wikipedia teaches us:

Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable.([..])[https://en.wikipedia.org/wiki/XML]

To improve on the human-readable part, this rule ensures that the XML of the project files is properly indented. For now, only indentation using 2 spaces is supported, as we do not support reading the .editorconfig yet.

Non-compliant

<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
  <TargetFramework>net8.0</TargetFramework>
     </PropertyGroup>
  
  <ItemGroup Label="With tabs">
				<Compile Include="../common/Code.cs" />
  </ItemGroup>

  <ItemGroup><Folder Include="Same line" /></ItemGroup>

</Project>

Compliant

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
  </PropertyGroup>
  
  <ItemGroup Label="Without tabs">
    <Compile Include="../common/Code.cs" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="New line" />
  </ItemGroup>

</Project>