Skip to content

Commit b21506f

Browse files
stho32claude
andcommitted
Wartung: TreatWarningsAsErrors, CLAUDE.md, CodeQL, Dependabot
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 34a407b commit b21506f

9 files changed

Lines changed: 114 additions & 3 deletions

File tree

.github/dependabot.yml

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

.github/workflows/codeql.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
schedule:
9+
- cron: '0 6 * * 1'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ 'csharp' ]
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Setup .NET
30+
uses: actions/setup-dotnet@v4
31+
with:
32+
dotnet-version: '10.0.x'
33+
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@v3
36+
with:
37+
languages: ${{ matrix.language }}
38+
queries: security-extended
39+
40+
- name: Build
41+
run: dotnet build Source/spamfilter/spamfilter.sln --configuration Release
42+
43+
- name: Perform CodeQL Analysis
44+
uses: github/codeql-action/analyze@v3
45+
with:
46+
category: "/language:${{ matrix.language }}"

CLAUDE.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# CLAUDE.md
2+
3+
## Projektbeschreibung
4+
5+
Externer IMAP-basierter Spam-Filter mit konfigurierbarer Rule-Engine.
6+
Verbindet sich per IMAP mit einem Mailserver und wendet benutzerdefinierte Regeln an,
7+
um E-Mails automatisch in Ordner zu verschieben oder zu loeschen.
8+
9+
## TechStack
10+
11+
- .NET 10.0 (C#)
12+
- Architektur-Vorlage: dotnet-cli-tool
13+
- MailKit fuer IMAP-Zugriff
14+
- xUnit + AltCover fuer Tests und Coverage
15+
16+
## Projektstruktur
17+
18+
```
19+
Source/spamfilter/
20+
spamfilter.console/ # CLI-Einstiegspunkt
21+
spamfilter.BL/ # Business Logic (Rules, Actions)
22+
spamfilter.Infrastructure/ # IMAP-Anbindung, Konfiguration
23+
spamfilter.Interfaces/ # Interfaces und Entities
24+
spamfilter.BL.Tests/ # Unit-Tests
25+
```
26+
27+
## Build und Test
28+
29+
```bash
30+
# Build
31+
cd Source/spamfilter
32+
dotnet build
33+
34+
# Tests ausfuehren
35+
cd Source/spamfilter
36+
dotnet test
37+
38+
# Tests mit Coverage
39+
./update-coverage.sh
40+
```
41+
42+
## Konventionen
43+
44+
- TreatWarningsAsErrors ist in allen Projekten aktiviert
45+
- Nullable Reference Types sind aktiviert
46+
- NuGet-Warnungen NU1902/NU1903 sind per NoWarn unterdrueckt (vorbestehende Abhaengigkeiten)
47+
- Code folgt C#-Standardkonventionen (PascalCase fuer Typen/Methoden, _camelCase fuer private Felder)

Source/spamfilter/spamfilter.BL.Tests/spamfilter.BL.Tests.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
8+
<NoWarn>NU1902;NU1903</NoWarn>
79
</PropertyGroup>
810

911
<ItemGroup>

Source/spamfilter/spamfilter.BL/Actions/MoveEmailToFolderActionFactory.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
using spamfilter.Interfaces;
21
using spamfilter.Interfaces.Actions;
32
using spamfilter.Interfaces.Entities;
4-
using spamfilter.Interfaces.Repositories;
53

64
namespace spamfilter.BL.Actions;
75

86
public class MoveEmailToFolderActionFactory : IActionFactory
97
{
10-
private readonly IEmailRepository _emailRepository;
118
private readonly string _targetFolder;
129

1310
public MoveEmailToFolderActionFactory(string targetFolder)

Source/spamfilter/spamfilter.BL/spamfilter.BL.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
8+
<NoWarn>NU1902;NU1903</NoWarn>
79
</PropertyGroup>
810

911
<ItemGroup>

Source/spamfilter/spamfilter.Infrastructure/spamfilter.Infrastructure.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
8+
<NoWarn>NU1902;NU1903</NoWarn>
79
</PropertyGroup>
810

911
<ItemGroup>

Source/spamfilter/spamfilter.Interfaces/spamfilter.Interfaces.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
8+
<NoWarn>NU1902;NU1903</NoWarn>
79
</PropertyGroup>
810

911
<ItemGroup>

Source/spamfilter/spamfilter.console/spamfilter.console.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
9+
<NoWarn>NU1902;NU1903</NoWarn>
810
</PropertyGroup>
911

1012
<ItemGroup>

0 commit comments

Comments
 (0)