Skip to content

Commit 9e06637

Browse files
authored
Merge pull request #367 from maxmind/greg/eng-3437
Convert all model and response classes to C# records
2 parents 6288e10 + fb94f35 commit 9e06637

70 files changed

Lines changed: 1252 additions & 1219 deletions

Some content is hidden

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

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ version: 2
22
updates:
33
- package-ecosystem: nuget
44
directories:
5-
- '**/*'
5+
- "**/*"
66
schedule:
77
interval: daily
8-
time: '14:00'
8+
time: "14:00"
99
open-pull-requests-limit: 10
1010
cooldown:
1111
default-days: 7
1212
- package-ecosystem: github-actions
1313
directory: /
1414
schedule:
1515
interval: daily
16-
time: '14:00'
16+
time: "14:00"
1717
cooldown:
1818
default-days: 7

.github/workflows/codeql-analysis.yml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,62 +3,62 @@ name: "Code scanning - action"
33
on:
44
push:
55
branches-ignore:
6-
- 'dependabot/**'
6+
- "dependabot/**"
77
pull_request:
88
schedule:
9-
- cron: '0 10 * * 5'
9+
- cron: "0 10 * * 5"
1010

1111
jobs:
1212
CodeQL-Build:
13-
1413
runs-on: ubuntu-latest
1514

1615
permissions:
1716
security-events: write
1817

1918
steps:
20-
- name: Checkout repository
21-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22-
with:
23-
# We must fetch at least the immediate parents so that if this is
24-
# a pull request then we can checkout the head.
25-
fetch-depth: 2
26-
persist-credentials: false
19+
- name: Checkout repository
20+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21+
with:
22+
# We must fetch at least the immediate parents so that if this is
23+
# a pull request then we can checkout the head.
24+
fetch-depth: 2
25+
persist-credentials: false
2726

28-
# If this run was triggered by a pull request event, then checkout
29-
# the head of the pull request instead of the merge commit.
30-
- run: git checkout HEAD^2
31-
if: ${{ github.event_name == 'pull_request' }}
27+
# If this run was triggered by a pull request event, then checkout
28+
# the head of the pull request instead of the merge commit.
29+
- run: git checkout HEAD^2
30+
if: ${{ github.event_name == 'pull_request' }}
3231

33-
- name: Setup .NET
34-
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
35-
with:
36-
dotnet-version: |
37-
8.0.x
38-
9.0.x
32+
- name: Setup .NET
33+
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
34+
with:
35+
dotnet-version: |
36+
8.0.x
37+
9.0.x
38+
10.0.x
3939
40-
# Initializes the CodeQL tools for scanning.
41-
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
43-
# Override language selection by uncommenting this and choosing your languages
44-
# with:
45-
# languages: go, javascript, csharp, python, cpp, java
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
43+
# Override language selection by uncommenting this and choosing your languages
44+
# with:
45+
# languages: go, javascript, csharp, python, cpp, java
4646

47-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
48-
# If this step fails, then you should remove it and run the build manually (see below)
49-
- name: Autobuild
50-
uses: github/codeql-action/autobuild@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
47+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
48+
# If this step fails, then you should remove it and run the build manually (see below)
49+
- name: Autobuild
50+
uses: github/codeql-action/autobuild@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
5151

52-
# ℹ️ Command-line programs to run using the OS shell.
53-
# 📚 https://git.io/JvXDl
52+
# ℹ️ Command-line programs to run using the OS shell.
53+
# 📚 https://git.io/JvXDl
5454

55-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
56-
# and modify them (or add more) to build your code if your project
57-
# uses a compiled language
55+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
56+
# and modify them (or add more) to build your code if your project
57+
# uses a compiled language
5858

59-
#- run: |
60-
# make bootstrap
61-
# make release
59+
#- run: |
60+
# make bootstrap
61+
# make release
6262

63-
- name: Perform CodeQL Analysis
64-
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
63+
- name: Perform CodeQL Analysis
64+
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6

.github/workflows/precious.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: precious
2+
on:
3+
push:
4+
pull_request:
5+
schedule:
6+
- cron: "5 5 * * SUN"
7+
permissions: {}
8+
jobs:
9+
precious:
10+
name: lint
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
14+
with:
15+
persist-credentials: false
16+
- name: Setup mise
17+
uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1
18+
with:
19+
cache: true
20+
env:
21+
MISE_JOBS: "1" # Avoids race condition with parallel dotnet SDK installs
22+
- name: Run precious lint
23+
run: precious lint --all

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
push:
44
pull_request:
55
schedule:
6-
- cron: '3 20 * * SUN'
6+
- cron: "3 20 * * SUN"
77

88
permissions: {}
99

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ ipch/
6262

6363
# ReSharper is a .NET coding add-in
6464
_ReSharper*
65+
*.DotSettings
6566

6667
# NCrunch
6768
*.ncrunch*
@@ -101,6 +102,12 @@ AppPackages/
101102
.idea
102103
*.iml
103104

105+
# Build logs
106+
*.binlog
107+
108+
# Worktrees
109+
.worktrees
110+
104111
# Others
105112
[Bb]in
106113
[Oo]bj

.precious.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
exclude = [
2+
".git",
3+
]
4+
5+
[commands.prettier-markdown]
6+
type = "both"
7+
cmd = ["prettier", "--prose-wrap", "always"]
8+
lint-flags = ["--check"]
9+
tidy-flags = ["--write"]
10+
path-args = "absolute-file"
11+
include = "**/*.md"
12+
ok-exit-codes = 0
13+
14+
[commands.prettier-json]
15+
type = "both"
16+
cmd = ["prettier"]
17+
lint-flags = ["--check"]
18+
tidy-flags = ["--write"]
19+
path-args = "absolute-file"
20+
include = "**/*.json"
21+
ok-exit-codes = 0
22+
23+
[commands.prettier-yaml]
24+
type = "both"
25+
cmd = ["prettier"]
26+
lint-flags = ["--check"]
27+
tidy-flags = ["--write"]
28+
path-args = "absolute-file"
29+
include = ["**/*.yml", "**/*.yaml"]
30+
ok-exit-codes = 0

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"proseWrap": "always",
3+
"printWidth": 80,
4+
"tabWidth": 2,
5+
"useTabs": false
6+
}

0 commit comments

Comments
 (0)