Skip to content

Conversation

@fadi-george
Copy link
Collaborator

@fadi-george fadi-george commented Oct 8, 2025

Description

One Line Summary

  • formats existing c# files and add c# formatting checks

Details

  • adds vscode settings to suggest using csharper extension
  • adds c# formatting checker and recommended extensions
  • also adds a simple ci workflow to check for formatting issues for c# files

Motivation

  • want to have consistent formatting between devs

Manual Test

I ran dotnet tool install -g csharpier and then csharpier format . to format existing files.

I also modified a c# file with improper formatting and then ran format without saving.
Followed by csharpier format . to validate against formatting issues.

See previous action with an error: https://github.com/OneSignal/OneSignal-Unity-SDK/actions/runs/18358116512/job/52295294827?pr=794

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

@fadi-george fadi-george requested a review from jkasten2 October 8, 2025 21:09
Copy link
Member

@jkasten2 jkasten2 left a comment

Choose a reason for hiding this comment

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

OneSignalExample/Packages is not our code. Can we not change the formatting and omit the folder from the csharpier check command?

@fadi-george fadi-george force-pushed the fg/formatting-changes branch from 6fe6554 to edb99b1 Compare October 8, 2025 21:30
@fadi-george
Copy link
Collaborator Author

OneSignalExample/Packages is not our code. Can we not change the formatting and omit the folder from the csharpier check command?

Done

@fadi-george fadi-george merged commit def8368 into main Oct 8, 2025
2 checks passed
@fadi-george fadi-george deleted the fg/formatting-changes branch October 8, 2025 21:36
@jkasten2 jkasten2 mentioned this pull request Oct 8, 2025
18 tasks
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.

3 participants