build: enable .NET analyzers and enforce consistency on generated code#2
Merged
Conversation
Owner
UltimateSeeSharp
commented
May 17, 2026
- Enable EnableNETAnalyzers with AnalysisLevel=latest, AnalysisMode=Recommended, and EnforceCodeStyleInBuild in Directory.Build.props; TreatWarningsAsErrors gates findings in CI
- Add root .editorconfig excluding generated code (MavNet.Protocol.Generated tree and MessageRegistry.cs) with minimal suppression baseline (CA1062/CA2007/IDE0058/CA1031/CA1848/CA1873, plus tool-scoped CA1305)
- Pin codegen process culture to InvariantCulture in tools/MavNet.CodeGen/Program.cs for determinism; update RegistryEmitter.cs for enum rename
- Rename public enum MessageFlags → MessageCapabilities in MessageInfo.cs (BREAKING for 0.1.0 pre-release)
- Address analyzer findings: GC.SuppressFinalize in Vehicle.DisposeAsync (CA1816), ObjectDisposedException.ThrowIf in MissionClient (CA1513), reorder Drone.ConnectAsync cancellation token parameter (CA1068), make Probe IDisposable (CA1001), update test helper return types (CA1859)
- Add AllowlistWiringConsistencyTests to verify allowlisted inbound messages have matching IMavlinkConnection events; catches codegen/wiring drift
- Update CLAUDE.md with static-analysis section and allowlist wiring guard note; refresh README.md and ROADMAP.md per docs-alongside rule
- Enable EnableNETAnalyzers with AnalysisLevel=latest, AnalysisMode=Recommended, and EnforceCodeStyleInBuild in Directory.Build.props; TreatWarningsAsErrors gates findings in CI - Add root .editorconfig excluding generated code (MavNet.Protocol.Generated tree and MessageRegistry.cs) with minimal suppression baseline (CA1062/CA2007/IDE0058/CA1031/CA1848/CA1873, plus tool-scoped CA1305) - Pin codegen process culture to InvariantCulture in tools/MavNet.CodeGen/Program.cs for determinism; update RegistryEmitter.cs for enum rename - Rename public enum MessageFlags → MessageCapabilities in MessageInfo.cs (BREAKING for 0.1.0 pre-release) - Address analyzer findings: GC.SuppressFinalize in Vehicle.DisposeAsync (CA1816), ObjectDisposedException.ThrowIf in MissionClient (CA1513), reorder Drone.ConnectAsync cancellation token parameter (CA1068), make Probe IDisposable (CA1001), update test helper return types (CA1859) - Add AllowlistWiringConsistencyTests to verify allowlisted inbound messages have matching IMavlinkConnection events; catches codegen/wiring drift - Update CLAUDE.md with static-analysis section and allowlist wiring guard note; refresh README.md and ROADMAP.md per docs-alongside rule
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.