Skip to content

Conversation

@softworkz
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings November 15, 2025 07:22
Copilot finished reviewing on behalf of softworkz November 15, 2025 07:28
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 improves code quality by removing trailing whitespace across the codebase and introduces a GitHub Action workflow to automatically check for trailing whitespace in future pull requests. The changes are primarily formatting-related with no functional modifications to the code.

Key Changes:

  • Added a comprehensive GitHub Action workflow to check for trailing whitespace in pull requests
  • Removed trailing whitespace from 60+ files across TypeScript, C#, and project configuration files
  • Added ReSharper .DotSettings configuration file

Reviewed Changes

Copilot reviewed 49 out of 108 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
.github/workflows/trailing-whitespace-check.yml New GitHub Action workflow to automatically check for trailing whitespace in PRs
src/ElectronNET.sln.DotSettings Added ReSharper configuration for code formatting standards
src/ElectronNET.WebApp/ElectronHostHook/connector.ts Removed trailing whitespace from TypeScript connector file
src/ElectronNET.WebApp/Controllers/*.cs Removed trailing whitespace from controller files
src/ElectronNET.IntegrationTests/Tests/*.cs Removed trailing whitespace and added blank lines for consistency in test files
src/ElectronNET.Host/api/*.ts Removed trailing whitespace from TypeScript API files
src/ElectronNET.Build/ElectronNET.Build.csproj Fixed indentation and removed trailing whitespace in project file
src/ElectronNET.API/**/*.cs Removed trailing whitespace, fixed spacing around colons in class declarations, and standardized file endings across 40+ API files
nuke/ReleaseNotesParser.cs Removed trailing whitespace from build script

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

uses: actions/checkout@v4
with:
fetch-depth: 0

Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

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

[nitpick] The checkout action should also fetch the base branch to ensure accurate diff comparison. Consider adding:

- name: Fetch base branch
  run: git fetch origin ${{ github.event.pull_request.base.ref }}

before the "Check for trailing whitespace" step, or use fetch-depth: 2 instead of 0 for better performance.

Suggested change
- name: Fetch base branch
run: git fetch origin ${{ github.event.pull_request.base.ref }}

Copilot uses AI. Check for mistakes.
fi
# File patterns to check (text files)
PATTERNS="\.cs$|\.csproj$|\.sln$|\.ts$|\.html$|\.css$|\.scss$"
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

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

[nitpick] The pattern .sln$ is included in the check patterns, but the .DotSettings file being added in this PR is not covered. Consider adding \.DotSettings$ to the patterns if you want to check these configuration files for trailing whitespace as well.

Suggested change
PATTERNS="\.cs$|\.csproj$|\.sln$|\.ts$|\.html$|\.css$|\.scss$"
PATTERNS="\.cs$|\.csproj$|\.sln$|\.DotSettings$|\.ts$|\.html$|\.css$|\.scss$"

Copilot uses AI. Check for mistakes.
{
tcs.SetException(new InvalidOperationException(error));
});
BridgeConnector.Socket.Once<string>("webContents-loadURL-error" + Id, (error) => { tcs.SetException(new InvalidOperationException(error)); });
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

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

[nitpick] While condensing this lambda to a single line removes trailing whitespace, it may reduce readability. Consider keeping multi-line lambdas on separate lines for better code clarity, especially when they contain meaningful logic like exception handling.

Copilot uses AI. Check for mistakes.
{
_notificationOptions.Single(x => x.ReplyID == args[0]).OnReply(args[1]);
});
BridgeConnector.Socket.On<string[]>("NotificationEventReply", (args) => { _notificationOptions.Single(x => x.ReplyID == args[0]).OnReply(args[1]); });
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

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

[nitpick] Similar to the comment above, condensing this multi-line lambda with meaningful logic into a single line may reduce readability. Consider keeping it on separate lines for better code clarity.

Copilot uses AI. Check for mistakes.
{
_notificationOptions.Single(x => x.ActionID == args[0]).OnAction(args[1]);
});
BridgeConnector.Socket.On<string[]>("NotificationEventAction", (args) => { _notificationOptions.Single(x => x.ActionID == args[0]).OnAction(args[1]); });
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

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

[nitpick] Similar to the comments above, condensing this multi-line lambda with meaningful logic into a single line may reduce readability. Consider keeping it on separate lines for better code clarity.

Copilot uses AI. Check for mistakes.
{
Electron.Dialog.ShowErrorBox("Host Hook Exception", result);
});
BridgeConnector.Socket.Once<string>(socketEventName + "Error" + oneCallguid, (result) => { Electron.Dialog.ShowErrorBox("Host Hook Exception", result); });
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

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

[nitpick] Similar to the comments above, condensing this multi-line lambda with error handling logic into a single line may reduce readability. Consider keeping it on separate lines for better code clarity.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,7 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
Copy link

Copilot AI Nov 15, 2025

Choose a reason for hiding this comment

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

Typo in XML namespace: "shemas" should be "schemas". This should be xmlns:ss="urn:schemas-jetbrains-com:settings-storage-xaml".

Copilot uses AI. Check for mistakes.
@FlorianRappl FlorianRappl added this to the 0.2.0 milestone Nov 15, 2025
@softworkz softworkz force-pushed the submit_whitespace2 branch 2 times, most recently from 48d9ffb to 40b0cf5 Compare November 15, 2025 12:47
@softworkz
Copy link
Collaborator Author

Rebased

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 dbf76a1 into ElectronNET:develop Nov 15, 2025
2 checks passed
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.

2 participants