Conversation
… of parameters Agent-Logs-Url: https://github.com/meziantou/Meziantou.Analyzer/sessions/302b5114-08cd-481e-88f9-918228065114 Co-authored-by: meziantou <509220+meziantou@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix MA0135 glitches with Serilog ILogger
Fix MA0135/MA0139: Serilog Apr 8, 2026
@ destructuring prefix not stripped consistently for multi-parameter log calls
This was referenced Apr 8, 2026
Closed
Closed
Closed
This was referenced Apr 14, 2026
Open
This was referenced Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MA0135/MA0139 inconsistently stripped the Serilog
@destructuring prefix depending on the number of log arguments. With a single argument,{@foo}was correctly resolved tofooinLoggerParameterTypes.txt. With multiple arguments, stripping was skipped, requiring@fooin the config instead — contradicting the single-argument behavior.Root cause:
potentialNamePrefixes = SerilogPrefixeswas set inside theif (arguments.Length == templateIndex + 2)guard, which only matches when there is exactly one argument after the message template (the params-array overload case). Typed generic overloads with 2+ arguments bypassed it entirely.Fix: Move
potentialNamePrefixes = SerilogPrefixesunconditionally into the Serilog branch, outside the single-argument guard. The@/$prefix is now always stripped for Serilog log method calls regardless of argument count.LoggerParameterTypes.txtentries should always be written without the@prefix (e.g.foo;System.Object, not@foo;System.Object).Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
1s1vsblobprodcus386.vsblob.vsassets.io/usr/share/dotnet/dotnet dotnet restore --no-dependencies /home/REDACTED/work/Meziantou.Analyzer/Meziantou.Analyzer/Meziantou.Analyzer.slnx --packages /tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:AllowMissingPrunePackageData=true(dns block)pdfvsblobprodcus380.vsblob.vsassets.io/usr/share/dotnet/dotnet dotnet restore --no-dependencies /home/REDACTED/work/Meziantou.Analyzer/Meziantou.Analyzer/Meziantou.Analyzer.slnx --packages /tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:AllowMissingPrunePackageData=true(dns block)st8vsblobprodcus339.vsblob.vsassets.io/usr/share/dotnet/dotnet dotnet restore --no-dependencies /home/REDACTED/work/Meziantou.Analyzer/Meziantou.Analyzer/Meziantou.Analyzer.slnx --packages /tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/tmp/codeql-scratch-8ad8dc5536a632e8/dbs/csharp/working/emptyFakeDotnetRoot /p:AllowMissingPrunePackageData=true(dns block)If you need me to access, download, or install something from one of these locations, you can either: