Skip to content

Commit 1a0b12b

Browse files
authored
Merge pull request #399 from MangoInstantMessenger/editorconfig
editor config updates | dictionary commit | minor clean ups
2 parents 7a67bc4 + 5cfec0a commit 1a0b12b

15 files changed

Lines changed: 82 additions & 44 deletions

File tree

.editorconfig

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1-
# Remove the line below if you want to inherit .editorconfig settings from higher directories
21
root = true
32

4-
# C# files
3+
# noinspection EditorConfigKeyCorrectness
54
[*.cs]
6-
dotnet_diagnostic.CA1824.severity = none
5+
dotnet_diagnostic.CA1824.severity = warning
6+
dotnet_diagnostic.IDE0005.severity = warning
7+
dotnet_diagnostic.CA1707.severity = warning
8+
dotnet_diagnostic.CA1822.severity = warning
9+
dotnet_diagnostic.CA1416.severity = warning
10+
dotnet_diagnostic.IDE0072.severity = warning
11+
dotnet_diagnostic.IDE0270.severity = warning
12+
13+
# populate switch
14+
dotnet_diagnostic.IDE0010.severity = warning
15+
16+
# fix formatting
717
dotnet_diagnostic.IDE0055.severity = none
8-
dotnet_diagnostic.IDE0005.severity = none
18+
19+
# if statement can be simplified
20+
dotnet_diagnostic.IDE0046.severity = warning
21+
22+
# expression value never used
923
dotnet_diagnostic.IDE0058.severity = none
10-
dotnet_diagnostic.CA1707.severity = none
11-
dotnet_diagnostic.CA1822.severity = none
12-
dotnet_diagnostic.IDE0046.severity = none
13-
dotnet_diagnostic.CA1416.severity = none
14-
dotnet_diagnostic.IDE0072.severity = none
15-
dotnet_diagnostic.IDE0270.severity = none
1624

1725
#### Core EditorConfig Options ####
1826

@@ -264,4 +272,17 @@ charset = utf-8
264272

265273
# Set severity = error for all analyzers
266274

267-
dotnet_analyzer_diagnostic.severity = error
275+
dotnet_analyzer_diagnostic.severity = error
276+
277+
# resharper rules
278+
279+
resharper_inconsistent_naming_highlighting = none
280+
resharper_built_in_type_reference_style_for_member_access_highlighting = none
281+
resharper_arrange_object_creation_when_type_evident_highlighting = none
282+
resharper_arrange_trailing_comma_in_multiline_lists_highlighting = none
283+
resharper_arrange_trailing_comma_in_singleline_lists_highlighting = none
284+
resharper_comment_typo_highlighting = warning
285+
resharper_identifier_typo_highlighting = warning
286+
resharper_string_literal_typo_highlighting = warning
287+
resharper_unused_type_global_highlighting = warning
288+
resharper_unused_member_global_highlighting = warning

.github/workflows/build-angular.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- develop
7-
- cache
7+
- master
88

99
pull_request:
1010
branches: [ develop ]

.github/workflows/run-openssl-dh-handshake.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Run OpenSSL DH Handshake
22

33
on:
4-
push:
5-
branches: [ MANGO-520 ]
64
workflow_dispatch:
75

86
jobs:

MangoAPI.Application/Interfaces/ICorrelationContext.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@ namespace MangoAPI.Application.Interfaces;
55
public interface ICorrelationContext
66
{
77
public Guid GetUserId();
8-
9-
public string GetUserName();
108
}

MangoAPI.Application/Services/CorrelationContext.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,4 @@ public Guid GetUserId()
2828
$"User ID cannot be parsed. {nameof(correlationContextUserId)}.")
2929
: parsedUserId;
3030
}
31-
32-
public string GetUserName()
33-
{
34-
var context = httpContextAccessor.HttpContext;
35-
36-
var correlationUserName = context.User.FindFirstValue(JwtRegisteredClaimNames.Name);
37-
38-
return string.IsNullOrEmpty(correlationUserName)
39-
? throw new InvalidOperationException(
40-
$"User Name cannot be null or empty. {nameof(correlationUserName)}.")
41-
: correlationUserName;
42-
}
4331
}

MangoAPI.BusinessLogic/ApiCommands/Users/RegisterCommandHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public async Task<Result<TokensResponse>> Handle(RegisterCommand request, Cancel
161161

162162
dbContext.Chats.Add(mangoChatEntity);
163163
dbContext.UserChats.AddRange(userChats);
164-
dbContext.Messages.AddRange(new [] {firstMessage, secondMessage});
164+
dbContext.Messages.AddRange(firstMessage, secondMessage);
165165

166166
await dbContext.SaveChangesAsync(cancellationToken);
167167

MangoAPI.BusinessLogic/ApiQueries/AppInfo/GetAppInfoQuery.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
namespace MangoAPI.BusinessLogic.ApiQueries.AppInfo;
55

6-
public record GetAppInfoQuery() : IRequest<Result<GetAppInfoResponse>>;
6+
public record GetAppInfoQuery : IRequest<Result<GetAppInfoResponse>>;

MangoAPI.BusinessLogic/ApiQueries/AppInfo/GetAppInfoResponse.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33

44
namespace MangoAPI.BusinessLogic.ApiQueries.AppInfo;
55

6-
public record GetAppInfoResponse() : ResponseBase
6+
public record GetAppInfoResponse : ResponseBase
77
{
88
public Models.AppInfo AppInfo { get; set; }
9-
9+
1010
public static GetAppInfoResponse FromSuccess(Models.AppInfo appInfo)
1111
{
12-
return new()
13-
{
14-
Message = ResponseMessageCodes.Success,
15-
Success = true,
16-
AppInfo = appInfo
17-
};
12+
return new GetAppInfoResponse { Message = ResponseMessageCodes.Success, Success = true, AppInfo = appInfo };
1813
}
19-
};
14+
}

MangoAPI.BusinessLogic/ApiQueries/Communities/GetCurrentUserChatsResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public record GetCurrentUserChatsResponse : ResponseBase
1111

1212
public static GetCurrentUserChatsResponse FromSuccess(List<Chat> chats)
1313
{
14-
return new()
14+
return new GetCurrentUserChatsResponse
1515
{
1616
Message = ResponseMessageCodes.Success,
1717
Success = true,

MangoAPI.BusinessLogic/ApiQueries/Messages/SearchChatMessagesResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public record SearchChatMessagesResponse : ResponseBase
1111

1212
public static SearchChatMessagesResponse FromSuccess(List<Message> messages)
1313
{
14-
return new()
14+
return new SearchChatMessagesResponse
1515
{
1616
Messages = messages,
1717
Message = ResponseMessageCodes.Success,

0 commit comments

Comments
 (0)