Uh oh!
There was an error while loading. Please reload this page.
Webb app: add platform guards and promote analyzer severity - #932
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds platform-specific guards to prevent calling macOS/Windows-only Electron APIs on unsupported platforms and promotes the CA1416 analyzer (platform compatibility) to error severity to enforce these checks at compile time.
Key changes:
- Wraps
Electron.Dock.SetMenuwithIsMacOS()guard in Program.cs - Wraps PowerMonitor event subscriptions with
IsMacOS() || IsWindows()guard in HomeController.cs - Adds .editorconfig to promote CA1416 to error severity
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/.editorconfig | Promotes CA1416 (platform compatibility) analyzer to error severity for all C# files |
| src/ElectronNET.WebApp/Program.cs | Adds macOS guard around Dock API usage |
| src/ElectronNET.WebApp/Controllers/HomeController.cs | Adds macOS/Windows guard around PowerMonitor event subscriptions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
softworkz
commented
Nov 15, 2025
Ouch...
(but well - only until the others are merged...) |
This should be merged last, otherwise it would cause errors