-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
Milestone
Description
We transform MSBuild properties to global analyzer configs via the GenerateMSBuildAnalyzerConfig task.
In MSBuild it's permissible for properites to contain newlines, which transfers into the resulting config, breaking downstream parsing.
For example:
<PropertyGroup>
<PropWithNewLine>this
is
a
valid = property
</PropWithNewLine>
</PropertyGroup>would result in
is_global = true
msbuild_property.PropWithNewLine = this
is
a
valid = property
This is true for semicolons too. These are common in msbuild as its the default combine character for a list
For example:
<ItemGroup>
<Item1 Include="a" />
<Item1 Include="b" />
<Item1 Include="c" />
</ItemGroup>
<PropertyGroup>
<Item1Combined>@(Item1)</Item1Combined>
</PropertyGroup>Will result in
build_property.Item1Combined = a;b;c
In editorconfig ; is the comment character, meaning only a will be passed to the consumer.
AArnott, flo-everett-xero, Sergio0694, viceroypenguin, aetos382 and 1 more