Skip to content

Commit 2127bdd

Browse files
committed
wip
1 parent af43374 commit 2127bdd

File tree

266 files changed

+25061
-805
lines changed

Some content is hidden

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

266 files changed

+25061
-805
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,12 @@ dotnet_diagnostic.SA1642.severity = none
7070

7171
# SA1516: Elements should be separated by blank line
7272
dotnet_diagnostic.SA1516.severity = none
73+
74+
# Expression-bodied members - prefer expression syntax
75+
csharp_style_expression_bodied_methods = true
76+
csharp_style_expression_bodied_constructors = false
77+
csharp_style_expression_bodied_properties = true
78+
csharp_style_expression_bodied_indexers = true
79+
csharp_style_expression_bodied_accessors = true
80+
csharp_style_expression_bodied_lambdas = true
81+
csharp_style_expression_bodied_local_functions = true

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @madhatter5501
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Bug Report
2+
description: Report a problem or regression in ErrorOr
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to report this issue.
10+
- type: textarea
11+
id: description
12+
attributes:
13+
label: Description
14+
description: What happened and what did you expect?
15+
placeholder: Describe the issue clearly and concisely.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: steps
20+
attributes:
21+
label: Steps to reproduce
22+
description: Provide minimal steps to reproduce the behavior.
23+
placeholder: |
24+
1. ...
25+
2. ...
26+
3. ...
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: expected
31+
attributes:
32+
label: Expected behavior
33+
description: What did you expect to happen?
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: actual
38+
attributes:
39+
label: Actual behavior
40+
description: What actually happened?
41+
- type: dropdown
42+
id: dotnet-version
43+
attributes:
44+
label: .NET version
45+
options:
46+
- .NET 10
47+
- .NET 8
48+
- .NET 6
49+
- Other
50+
validations:
51+
required: true
52+
- type: dropdown
53+
id: os
54+
attributes:
55+
label: Operating system
56+
options:
57+
- Windows
58+
- macOS
59+
- Linux
60+
validations:
61+
required: true
62+
- type: input
63+
id: erroror-version
64+
attributes:
65+
label: ErrorOr version
66+
placeholder: e.g. 3.1.0
67+
validations:
68+
required: true
69+
- type: textarea
70+
id: code-sample
71+
attributes:
72+
label: Code sample
73+
description: Paste a minimal reproducible example.
74+
render: shell
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Feature Request
2+
description: Suggest an idea or enhancement for ErrorOr
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for sharing your idea! Please fill out the details below.
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: Problem statement
14+
description: What problem are you trying to solve?
15+
placeholder: Describe the pain point or limitation.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: solution
20+
attributes:
21+
label: Proposed solution
22+
description: What would you like to see added or changed?
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: alternatives
27+
attributes:
28+
label: Alternatives considered
29+
description: Describe any alternatives you've considered.
30+
- type: dropdown
31+
id: component
32+
attributes:
33+
label: Component
34+
options:
35+
- Core ErrorOr
36+
- AspNetCore
37+
- Features
38+
- Serialization
39+
- Other
40+
validations:
41+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Description
2+
3+
## Related issue
4+
5+
- Closes #
6+
7+
## Type of change
8+
9+
- [ ] Bug fix
10+
- [ ] New feature
11+
- [ ] Breaking change
12+
- [ ] Documentation update
13+
- [ ] Refactor/maintenance
14+
15+
## Changes made
16+
17+
-
18+
19+
## Testing
20+
21+
- [ ] `dotnet test`
22+
- [ ] Other (describe below)
23+
24+
## Code quality checklist
25+
26+
- [ ] Builds are passing locally
27+
- [ ] Tests are passing locally
28+
- [ ] Documentation updated if needed

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "nuget"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 10
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
open-pull-requests-limit: 10

.github/labeler.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
area/core:
2+
- "src/ErrorOr/*.cs"
3+
area/aspnetcore:
4+
- "src/ErrorOr/AspNetCore/**"
5+
area/features:
6+
- "src/ErrorOr/Features/**"
7+
area/serialization:
8+
- "src/ErrorOr/Serialization/**"
9+
documentation:
10+
- "**/*.md"
11+
tests:
12+
- "tests/**"
13+
ci:
14+
- ".github/**"

.github/release-drafter.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name-template: "v$NEXT_PATCH_VERSION"
2+
tag-template: "v$NEXT_PATCH_VERSION"
3+
change-template: "- $TITLE (#$NUMBER)"
4+
categories:
5+
- title: "Features"
6+
labels:
7+
- "feature"
8+
- "enhancement"
9+
- title: "Bug Fixes"
10+
labels:
11+
- "fix"
12+
- "bug"
13+
- title: "Documentation"
14+
labels:
15+
- "docs"
16+
- title: "CI & Build"
17+
labels:
18+
- "ci"
19+
- "build"
20+
- title: "Chores"
21+
labels:
22+
- "chore"
23+
- "maintenance"
24+
template: |
25+
## Changes
26+
$CHANGES

.github/workflows/build.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v4
17+
with:
18+
dotnet-version: 10.0.x
19+
- name: Cache NuGet packages
20+
uses: actions/cache@v4
21+
with:
22+
path: ~/.nuget/packages
23+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
24+
restore-keys: |
25+
${{ runner.os }}-nuget-
26+
- name: Restore dependencies
27+
run: dotnet restore
28+
- name: Build with analyzers
29+
run: dotnet build -c Release -warnaserror
30+
31+
test:
32+
runs-on: ${{ matrix.os }}
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
os: [ubuntu-latest, windows-latest, macos-latest]
37+
dotnet: [8.0.x, 10.0.x]
38+
steps:
39+
- uses: actions/checkout@v4
40+
- name: Setup .NET
41+
uses: actions/setup-dotnet@v4
42+
with:
43+
dotnet-version: ${{ matrix.dotnet }}
44+
- name: Cache NuGet packages
45+
uses: actions/cache@v4
46+
with:
47+
path: ~/.nuget/packages
48+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
49+
restore-keys: |
50+
${{ runner.os }}-nuget-
51+
- name: Restore dependencies
52+
run: dotnet restore
53+
- name: Test with coverage
54+
run: dotnet test -c Release --no-restore --verbosity normal --collect:"XPlat Code Coverage" --settings tests/coverlet.runsettings
55+
- name: Upload coverage to Codecov
56+
if: matrix.os == 'ubuntu-latest' && matrix.dotnet == '10.0.x'
57+
uses: codecov/codecov-action@v4
58+
with:
59+
token: ${{ secrets.CODE_COV_TOKEN }}
60+
fail_ci_if_error: true
61+
62+
build:
63+
runs-on: ubuntu-latest
64+
needs: [lint, test]
65+
steps:
66+
- uses: actions/checkout@v4
67+
- name: Setup .NET
68+
uses: actions/setup-dotnet@v4
69+
with:
70+
dotnet-version: 10.0.x
71+
- name: Cache NuGet packages
72+
uses: actions/cache@v4
73+
with:
74+
path: ~/.nuget/packages
75+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
76+
restore-keys: |
77+
${{ runner.os }}-nuget-
78+
- name: Restore dependencies
79+
run: dotnet restore
80+
- name: Build
81+
run: dotnet build -c Release --no-restore
82+
- name: Pack
83+
run: dotnet pack -c Release --no-build -o ./artifacts
84+
- name: Upload artifacts
85+
uses: actions/upload-artifact@v4
86+
with:
87+
name: packages
88+
path: ./artifacts

0 commit comments

Comments
 (0)