Skip to content

Commit 79eca3d

Browse files
authored
feat: Code formatting cleanup and Postman test reorganization (#240)
* feat: Code formatting cleanup and Postman test reorganization * chore: Refactor middleware
1 parent 08ab11e commit 79eca3d

173 files changed

Lines changed: 21599 additions & 17095 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ ClientBin/
221221
*.publishsettings
222222
orleans.codegen.cs
223223

224-
# Including strong name files can present a security risk
224+
# Including strong name files can present a security risk
225225
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
226226
#*.snk
227227

@@ -317,7 +317,7 @@ __pycache__/
317317
# OpenCover UI analysis results
318318
OpenCover/
319319

320-
# Azure Stream Analytics local run output
320+
# Azure Stream Analytics local run output
321321
ASALocalRun/
322322

323323
# MSBuild Binary and Structured Log
@@ -326,12 +326,13 @@ ASALocalRun/
326326
# NVidia Nsight GPU debugger configuration file
327327
*.nvuser
328328

329-
# MFractors (Xamarin productivity tool) working folder
329+
# MFractors (Xamarin productivity tool) working folder
330330
.mfractor/
331331

332332
# Build artifacts
333333
/win-x64
334334
/src/AzureEventGridSimulator/appsettings.development.json
335+
/src/AzureEventGridSimulator.ConformanceTests/*.development.json
335336
/build-win64
336337
/build-osx-x64
337338
/build-linux-x64
@@ -355,3 +356,5 @@ my.env
355356
.scannerwork
356357
.claude
357358
.specify
359+
**/test-results/
360+
specs

docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ WORKDIR /source
55
# copy build configuration files first
66
COPY /src/Directory.Build.props .
77
COPY /src/Directory.Packages.props .
8+
COPY /src/.editorconfig .
89

910
# copy source
1011
COPY /src/AzureEventGridSimulator ./AzureEventGridSimulator

docker/appsettings.docker.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
},
2121
"topics": [
2222
{
23-
"name": "ExampleTopic",
23+
"name": "EventGridTopic",
2424
"port": 60101,
2525
"key": "TheLocal+DevelopmentKey=",
26+
"inputSchema": "EventGridSchema",
2627
"subscribers": {
2728
"http": [
2829
{
@@ -88,6 +89,21 @@
8889
}
8990
]
9091
}
92+
},
93+
{
94+
"name": "CloudEventsTopic",
95+
"port": 60102,
96+
"key": "TheLocal+DevelopmentKey=",
97+
"inputSchema": "CloudEventV1_0",
98+
"subscribers": {
99+
"http": [
100+
{
101+
"name": "CloudEventsRequestCatcherSubscription",
102+
"endpoint": "https://azureeventgridsimulator.requestcatcher.com/",
103+
"disableValidation": true
104+
}
105+
]
106+
}
91107
}
92108
]
93109
}

docker/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ services:
77
ports:
88
# add a port mapping for each topic in the settings file
99
- "60101:60101"
10+
- "60102:60102"
1011
volumes:
1112
# map this folder to a read-only folder '/aegs' in the container
1213
# this allows us to access files (e.g. settings or certificates) from within the container

src/.editorconfig

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# EditorConfig for AzureEventGridSimulator
2+
# https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 4
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
14+
[*.cs]
15+
# Meziantou.Analyzer rules - downgrade to suggestions for existing code
16+
# These can be gradually fixed over time
17+
18+
# MA0002: Use an overload that has a IEqualityComparer<string> or IComparer<string> parameter
19+
dotnet_diagnostic.MA0002.severity = suggestion
20+
21+
# MA0004: Use Task.ConfigureAwait(false)
22+
# Not needed in ASP.NET Core applications
23+
dotnet_diagnostic.MA0004.severity = none
24+
25+
# MA0006: Use string.Equals instead of == operator
26+
dotnet_diagnostic.MA0006.severity = suggestion
27+
28+
# MA0011: Use overload with IFormatProvider
29+
dotnet_diagnostic.MA0011.severity = suggestion
30+
31+
# MA0015: Use overload of ArgumentException with parameter name
32+
dotnet_diagnostic.MA0015.severity = suggestion
33+
34+
# MA0016: Prefer using collection abstraction instead of implementation
35+
dotnet_diagnostic.MA0016.severity = suggestion
36+
37+
# MA0026: TODO comments
38+
dotnet_diagnostic.MA0026.severity = suggestion
39+
40+
# MA0039: Do not write your own certificate validation method
41+
# This is intentionally disabled because the simulator has a user-opt-in
42+
# "dangerousAcceptAnyServerCertificateValidator" setting for testing purposes
43+
dotnet_diagnostic.MA0039.severity = none
44+
45+
# MA0046: Event delegate parameters
46+
dotnet_diagnostic.MA0046.severity = suggestion
47+
48+
# MA0048: File name must match type name
49+
dotnet_diagnostic.MA0048.severity = suggestion
50+
51+
# MA0049: Type name should not match containing namespace
52+
dotnet_diagnostic.MA0049.severity = suggestion
53+
54+
# MA0051: Method is too long
55+
dotnet_diagnostic.MA0051.severity = suggestion
56+
57+
# MA0055: Do not use finalizer
58+
# Finalizers are used in test fixtures for cleanup, which is acceptable
59+
dotnet_diagnostic.MA0055.severity = suggestion
60+
61+
# MA0158: Use System.Threading.Lock
62+
dotnet_diagnostic.MA0158.severity = suggestion

0 commit comments

Comments
 (0)