Skip to content

fix: honor #pragma warning disable in analyze, get_fixes, and apply_fix tools#9

Merged
Arthurvdv merged 1 commit into
mainfrom
fix/pragma-warning-support
Jun 9, 2026
Merged

fix: honor #pragma warning disable in analyze, get_fixes, and apply_fix tools#9
Arthurvdv merged 1 commit into
mainfrom
fix/pragma-warning-support

Conversation

@Arthurvdv

@Arthurvdv Arthurvdv commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

  • GetAnalyzerDiagnosticsAsync() returns raw diagnostics without applying #pragma warning disable/restore suppression. Piped results through the SDK's CompilationWithAnalyzers.GetEffectiveDiagnostics() and filtered out IsSuppressed diagnostics in both DiagnosticsRunner and CodeFixRunner
  • Added integration test with a pragma-suppressed fixture project to verify suppressed diagnostics are excluded from results

Closes #8

Test plan

  • dotnet build succeeds
  • dotnet test passes (4/4 tests, including new RunAsync_PragmaSuppressedDiagnostics_AreNotReported)
  • CI multi-version matrix passes
  • Manual: run alcops-mcp analyze on an AL file with #pragma warning disable AA0137 and verify AA0137 is not reported inside the pragma block

🤖 Generated with Claude Code

…ix tools

GetAnalyzerDiagnosticsAsync() returns raw diagnostics without applying
pragma suppression. Pipe results through GetEffectiveDiagnostics() and
filter IsSuppressed to match IDE behavior.

Closes #8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Arthurvdv Arthurvdv merged commit cae30f3 into main Jun 9, 2026
13 checks passed
@Arthurvdv Arthurvdv deleted the fix/pragma-warning-support branch June 9, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Question: Does analyze honor #pragma warning disable for standard analyzers?

1 participant