Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable nullable reference types #48

Merged
merged 5 commits into from
Dec 19, 2024
Merged

Enable nullable reference types #48

merged 5 commits into from
Dec 19, 2024

Conversation

RyanLua
Copy link
Owner

@RyanLua RyanLua commented Dec 18, 2024

Description

This pull request includes several changes to the FluentAutoClicker project to enable nullable reference types and improve code quality by handling potential null values. The most important changes include enabling nullable reference types in the project file, updating various class members to be nullable, and modifying event handlers and method parameters to handle nullable values.

Related Issues

Closes #40

Changes Made

Enabling nullable reference types:

Handling potential null values:

Checklist

  • I have tested these changes thoroughly.
  • I have reviewed my code for any potential errors or issues.
  • I have followed the code style guidelines for this project.

Additional Notes

@RyanLua RyanLua requested a review from Copilot December 18, 2024 23:06
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • FluentAutoClicker/FluentAutoClicker.csproj: Language not supported
Comments suppressed due to low confidence (2)

FluentAutoClicker/Program.cs:109

  • The process.MainWindowHandle may be IntPtr.Zero if the process does not have a main window. This could cause SetForegroundWindow to fail. Consider adding a check to ensure process.MainWindowHandle is not IntPtr.Zero before calling SetForegroundWindow.
_ = SetForegroundWindow(process.MainWindowHandle);

FluentAutoClicker/Helpers/WindowMessageHook.cs:93

  • The 'hook' variable can be null here. Add a null check before invoking 'hook.OnMessage(hook, e);'.
hook.OnMessage(hook, e);
@RyanLua RyanLua merged commit d0ad74e into main Dec 19, 2024
6 checks passed
@RyanLua RyanLua deleted the nullable-reference-types branch December 19, 2024 00:57
@RyanLua RyanLua self-assigned this Dec 19, 2024
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.

Enable nullable reference types
1 participant