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

feat(ci): add formatting check #49

Merged
merged 12 commits into from
Apr 5, 2024
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[*]
end_of_line = crlf
end_of_line = lf
insert_final_newline = true
charset = utf-8-bom
charset = utf-8
trim_trailing_whitespace = false
indent_style = space
indent_size = 4
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
7 changes: 5 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- 6044:6044

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

Expand All @@ -54,7 +54,7 @@ jobs:

- name: Setup .NET SDK ${{ matrix.dotnet-version.version }}
id: dotnet
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version.version }}

Expand All @@ -73,6 +73,9 @@ jobs:
- name: Install dependencies
run: dotnet restore

- name: Check Formatting
run: dotnet format --verify-no-changes --verbosity diagnostic

- name: Build
run: dotnet build -p:Version=${{ steps.gitversion.outputs.semVer }} --configuration Release --no-restore

Expand Down
2 changes: 1 addition & 1 deletion examples/Console/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DotNetEnv;
using DotNetEnv;
using Sinch;
using Sinch.Auth;

Expand Down
2 changes: 1 addition & 1 deletion examples/Console/RentAndConfigureNumbers.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text.Json;
using System.Text.Json;
using Sinch;
using Sinch.Numbers;
using Sinch.Numbers.Available.Rent;
Expand Down
2 changes: 1 addition & 1 deletion examples/Console/UseOnlyVoiceOrVerification.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Sinch;
using Sinch;

namespace Examples
{
Expand Down
2 changes: 1 addition & 1 deletion examples/Console/UseServicePlanIdForSms.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Sinch;
using Sinch;
using Sinch.SMS;
using Sinch.SMS.Batches.Send;

Expand Down
12 changes: 6 additions & 6 deletions examples/WebApi/Controllers/InboundSmsController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text.Json;
using System.Text.Json;
using Microsoft.AspNetCore.Mvc;
using Sinch;
using Sinch.SMS.Batches;
Expand Down Expand Up @@ -38,14 +38,14 @@ public async Task Subscribe([FromBody] IncomingTextSms incomingSms)
{
case (false, "SUBSCRIBE"):
await _sinchClient.Sms.Groups.Update(new UpdateGroupRequest
{
GroupId = group.Id,
Name = "group 1",
Add = new List<string>()
{
GroupId = group.Id,
Name = "group 1",
Add = new List<string>()
{
fromNumber,
}
}
}
);
autoReply = $"Congratulations! You are now subscribed to {group.Name}. Text STOP to leave this group.";
break;
Expand Down
2 changes: 1 addition & 1 deletion examples/WebApi/Controllers/Numbers.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using Sinch;
using Sinch.Numbers.Regions;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text.Json;
using System.Text.Json;
using System.Text.Json.Nodes;
using Microsoft.AspNetCore.Mvc;
using Sinch;
Expand Down
2 changes: 1 addition & 1 deletion examples/WebApi/Controllers/ReplyToInboundController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using Sinch;
using Sinch.SMS.Batches.Send;
using Sinch.SMS.Hooks;
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/ApiError.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text.Json.Nodes;

namespace Sinch
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Auth/ApplicationSignedAuth.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Auth/AuthApiError.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;

namespace Sinch.Auth
{
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Auth/AuthSchemes.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sinch.Auth
namespace Sinch.Auth
{
internal static class AuthSchemes
{
Expand Down
4 changes: 2 additions & 2 deletions src/Sinch/Auth/AuthStrategy.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace Sinch.Auth
namespace Sinch.Auth
{
public enum AuthStrategy
{
/// <summary>
/// Utilizes only AppId and AppSecret
/// </summary>
Basic,

/// <summary>
/// Utilizes <see href="https://developers.sinch.com/docs/verification/api-reference/authentication/signed-request/">Request Signing</see>
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Auth/BasicAuth.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Text;
using System.Threading.Tasks;

Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Auth/BearerAuth.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Threading.Tasks;

namespace Sinch.Auth
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Auth/ISinchAuth.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;

namespace Sinch.Auth
{
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Auth/OAuth.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Auth/SinchAuthException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Net;
using System.Net.Http;

Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Apps/App.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text;
using Sinch.Conversation.Common;

Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Apps/Apps.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text;
using System.Text;
using Sinch.Conversation.Apps.Credentials;
using Sinch.Conversation.Messages;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Sinch.Core;

namespace Sinch.Conversation.Apps
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Apps/Create/CreateAppRequest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text;
using Sinch.Conversation.Common;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sinch.Conversation.Apps.Credentials
namespace Sinch.Conversation.Apps.Credentials
{
/// <summary>
/// It consists of a username and a password.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sinch.Conversation.Apps.Credentials
namespace Sinch.Conversation.Apps.Credentials
{
/// <summary>
/// If you are including the KakaoTalk channel in the &#x60;channel_identifier&#x60; property, you must include this object.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sinch.Conversation.Apps.Credentials
namespace Sinch.Conversation.Apps.Credentials
{
/// <summary>
/// If you are including the LINE channel in the &#x60;channel_identifier&#x60; property, you must include this object.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sinch.Conversation.Apps.Credentials
namespace Sinch.Conversation.Apps.Credentials
{
/// <summary>
/// If you are including the MMS channel in the &#x60;channel_identifier&#x60; property, you must include this object.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sinch.Conversation.Apps.Credentials
namespace Sinch.Conversation.Apps.Credentials
{
/// <summary>
/// This object is required for channels which use a bearer-type of credential for authentication.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sinch.Conversation.Apps.Credentials
namespace Sinch.Conversation.Apps.Credentials
{
/// <summary>
/// This object is required for channels which use a static token credential for authentication.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text;
using System.Text;

namespace Sinch.Conversation.Apps.Credentials
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sinch.Conversation.Apps.Credentials
namespace Sinch.Conversation.Apps.Credentials
{
/// <summary>
/// If you are including the WeChat channel in the &#x60;channel_identifier&#x60; property, you must include this object.
Expand Down
4 changes: 2 additions & 2 deletions src/Sinch/Conversation/Apps/DispatchRetentionPolicy.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text;
using System.Text;

namespace Sinch.Conversation.Apps
{
Expand All @@ -23,7 +23,7 @@ public sealed class DispatchRetentionPolicy
/// so messages are not deleted on the minute they become eligible for deletion.
/// </summary>
public long TtlDays { get; set; }


/// <summary>
/// Returns the string presentation of the object
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Sinch.Core;

namespace Sinch.Conversation.Apps
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Apps/QueueStats.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text;
using System.Text;

namespace Sinch.Conversation.Apps
{
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Apps/RateLimits.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text;
using System.Text;

namespace Sinch.Conversation.Apps
{
Expand Down
6 changes: 3 additions & 3 deletions src/Sinch/Conversation/Apps/RetentionPolicy.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text;
using System.Text;

namespace Sinch.Conversation.Apps
{
Expand All @@ -12,7 +12,7 @@ public sealed class RetentionPolicy
/// Gets or Sets RetentionType
/// </summary>
public RetentionType RetentionType { get; set; }


/// <summary>
/// Optional. The days before a message or conversation is eligible for deletion.
Expand All @@ -22,7 +22,7 @@ public sealed class RetentionPolicy
/// messages and conversations are not deleted on the minute they become eligible for deletion.
/// </summary>
public long? TtlDays { get; set; }


/// <summary>
/// Returns the string presentation of the object
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Apps/RetentionType.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Sinch.Core;

namespace Sinch.Conversation.Apps
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Apps/SmartConversation.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sinch.Conversation.Apps
namespace Sinch.Conversation.Apps
{
/// <summary>
/// This object is required for apps that subscribe to Smart Conversations features.
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Apps/Update/UpdateAppRequest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Text;
using System.Text.Json.Serialization;
using Sinch.Conversation.Common;
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Capability/Capabilities.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Sinch.Conversation.Common;
using Sinch.Conversation.Common;

namespace Sinch.Conversation.Capability
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Sinch.Conversation.Common;
using Sinch.Conversation.Common;

namespace Sinch.Conversation.Capability
{
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Common/Agent.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Sinch.Conversation.Events.AppEvents;
using Sinch.Conversation.Events.AppEvents;

namespace Sinch.Conversation.Common
{
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Common/AgentType.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Sinch.Core;

namespace Sinch.Conversation.Common
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Common/ChannelIdentity.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sinch.Conversation.Common
namespace Sinch.Conversation.Common
{
public class ChannelIdentity
{
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Common/ContactId.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Sinch.Conversation.Common
namespace Sinch.Conversation.Common
{
public sealed class ContactRecipient : IRecipient
{
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Common/ProcessingMode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
using Sinch.Core;

namespace Sinch.Conversation.Common
Expand Down
2 changes: 1 addition & 1 deletion src/Sinch/Conversation/Contacts/Contact.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sinch.Conversation.Common;
Expand Down
Loading
Loading