-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiline item values get truncated #390
Comments
Just like we do for semicolon-separated values (encoding them prior to persistence to editorconfig/analyzer config), we now encode newlines as `\n` and decode them prior to emitting source code. This makes previously failing scenarios work (i.e. project properties) as well as fixing previously working ones in AssemblyInfo generator (i.e. Description property). Fixes #390
Just like we do for semicolon-separated values (encoding them prior to persistence to editorconfig/analyzer config), we now encode newlines as `\n` and decode them prior to emitting source code. This makes previously failing scenarios work (i.e. project properties) as well as fixing previously working ones in AssemblyInfo generator (i.e. Description property). Fixes #390
I still seem to be having this problem: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<ProjectRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), "Tomoe.sln"))</ProjectRoot>
<RepositoryUrl>https://github.com/OoLunar/Tomoe</RepositoryUrl>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<TargetFramework>net8.0</TargetFramework>
<Version>6.0.5</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProjectFile>$([System.IO.File]::ReadAllText("/home/lunar/Code/OoLunar/Tomoe/src/Tomoe.csproj"))</ProjectFile>
</PropertyGroup>
<ItemGroup>
<None Include="$(ProjectRoot)/res/config.json" CopyToOutputDirectory="PreserveNewest" />
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
<PackageReference Include="Humanizer" Version="2.14.1" />
<PackageReference Include="LiveChartsCore.SkiaSharpView" Version="2.0.0-rc3.3" />
<PackageReference Include="LiveChartsCore" Version="2.0.0-rc3.3" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.11.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Npgsql" Version="8.0.4" />
<PackageReference Include="Serilog" Version="4.0.2" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.8" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="ThisAssembly" Version="2.0.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<ProjectReference Include="$(ProjectRoot)/libs/DSharpPlus/DSharpPlus.Commands/DSharpPlus.Commands.csproj" />
<ProjectReference Include="$(ProjectRoot)/libs/XMLDocs.NET/src/XmlDocs.NET.csproj" />
<ProjectProperty Include="TargetFramework" />
<ProjectProperty Include="Version" />
<ProjectProperty Include="RepositoryUrl" />
<ProjectProperty Include="ProjectFile" />
<ProjectProperty Include="ProjectRoot" />
</ItemGroup>
</Project> Where the value of |
Newlines aren't supported in analyzer settings/options. Is the issue the extra I added a test and additional docs and support for specifying a See #420 |
This can help workaround the issue of the value having invalid content for an XML summary element (i..e. the value has XML). Further fixes #390
This can help workaround the issue of the value having invalid content for an XML summary element (i..e. the value has XML). Further fixes #390
Whether these are from project properties or direct constant items, when they are presisted via the editorconfig used for analyzer options, causes this issue.
The persistence in editorconfig does not escape newlines in any way, causing only the first line to be visible to analyzers.
The text was updated successfully, but these errors were encountered: