Skip to content

Conversation

@softworkz
Copy link
Collaborator

This should be merged last, otherwise it would cause errors

Copilot AI review requested due to automatic review settings November 15, 2025 08:52
Copilot finished reviewing on behalf of softworkz November 15, 2025 08:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.SetMenu with IsMacOS() 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.

@FlorianRappl FlorianRappl added this to the 0.2.0 milestone Nov 15, 2025
Copy link
Collaborator

@FlorianRappl FlorianRappl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@FlorianRappl FlorianRappl merged commit 12c5391 into ElectronNET:develop Nov 15, 2025
7 checks passed
@softworkz
Copy link
Collaborator Author

Ouch...

This should be merged last, otherwise it would cause errors

(but well - only until the others are merged...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants