Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
be8ba90
feat: Add `check-todos` task and GitHub workflow
currantw Jul 22, 2026
20ef797
refactor: Rename check tasks to use colon convention and split docs
currantw Jul 22, 2026
7fa5147
fix: Add --yes to npx calls to prevent interactive prompts
currantw Jul 22, 2026
5eb761b
First batch of TODO comment fixes and removals.
currantw Jul 22, 2026
35ac7de
Second batch of TODO comment fixes and removals.
currantw Jul 22, 2026
2e68930
Third batch of TODO comment fixes and removals.
currantw Jul 22, 2026
ac1376b
feat(check-todos): add ignore file support for TODO checker
currantw Jul 22, 2026
67fc692
Fourth batch of TODO comment fixes and removals.
currantw Jul 23, 2026
287825e
Add a minimum description length
currantw Jul 23, 2026
17a5de9
refactor: Move coverage config files to dev/conf
currantw Jul 23, 2026
6842f36
refactor: Simplify scan methods to delegate to GLIDE internals
currantw Jul 23, 2026
3714bc2
fix: Fix StreamTrimAsync infinite recursion and add guard clauses
currantw Jul 23, 2026
b834491
Fix TODO and add regions for stream commands
currantw Jul 23, 2026
1405c3b
refactor: Relax TODO pattern to match without comment prefix
currantw Jul 23, 2026
750c4e1
chore: Remove unused raw-args StreamTrimAsync overload
currantw Jul 23, 2026
5e75e2d
Remove unused ToValkeyKeyArray
currantw Jul 24, 2026
061a7f8
Make `SetScanAsync` and `SortedSetScanAsync` private protected.
currantw Jul 27, 2026
35148dc
Merge branch 'main' of https://github.com/valkey-io/valkey-glide-csha…
currantw Jul 27, 2026
7ff432a
Split TODO regexes
currantw Jul 27, 2026
ec9355d
Add space before TODO, simplify check_todos to enforce format
currantw Jul 27, 2026
43e18ec
Add GuardClauses.ThrowIfNotPositive and update scan methods to throw …
currantw Jul 27, 2026
2361673
Make _TODO_VALIDATION_PATTERN case sensitive
currantw Jul 27, 2026
b2e6bf1
Add TODOs for unused configurations.
currantw Jul 27, 2026
7ce7aa3
Clarify no inline comments
currantw Jul 27, 2026
4374ee5
fix: Restore StreamTrimAsync(long?) signature to avoid breaking change
currantw Jul 27, 2026
ec76f23
Update docs
currantw Jul 27, 2026
5545a96
Add TODO to "Check issue state"
currantw Jul 27, 2026
bd847b1
Merge branch 'main' of https://github.com/valkey-io/valkey-glide-csha…
currantw Jul 28, 2026
437606a
Update `ConnectionManagementCommandTests` to use `ServerFixture`
currantw Jul 28, 2026
c26d8f8
Use DisableParallelization = true
currantw Jul 28, 2026
8e69d47
Fixed shared batch test failure
currantw Jul 28, 2026
bcaebc6
Slight branch coverage decrease because of simplification (fewer bran…
currantw Jul 28, 2026
43a7aab
docs: Document intentional pageOffset divergence from StackExchange.R…
currantw Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ Not applicable items should be crossed out, not removed.
- [ ] `CHANGELOG.md`, `README.md`, `DEVELOPER.md`, and other documentation files are updated.
- [ ] Destination branch is correct - `main` or release
- [ ] Create merge commit if merging release branch into `main`, squash otherwise.
- [ ] All TODOs referencing issue(s) closed by this PR have been resolved.
8 changes: 6 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,12 @@ jobs:
- name: Pack the client
working-directory: sources/Valkey.Glide
run: |
dotnet build Valkey.Glide.csproj --configuration Release "/property:Version=$RELEASE_VERSION"
dotnet pack Valkey.Glide.csproj --configuration Release "-p:NuspecProperties=version=$RELEASE_VERSION"
dotnet build Valkey.Glide.csproj \
--configuration Release \
"/property:Version=$RELEASE_VERSION"
dotnet pack Valkey.Glide.csproj \
--configuration Release \
"-p:NuspecProperties=version=$RELEASE_VERSION;commit=${{ github.sha }}"
Comment thread
currantw marked this conversation as resolved.
tree -h bin/Release
unzip -l "bin/Release/Valkey.Glide.$RELEASE_VERSION.nupkg"
unzip -l "bin/Release/Valkey.Glide.$RELEASE_VERSION.snupkg"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
run: task build target=lib

- name: Check examples
run: task check-examples
run: task check:examples
34 changes: 34 additions & 0 deletions .github/workflows/check-todos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: check-todos

on:
push:
branches:
- main
- release-*
pull_request:
workflow_dispatch:

permissions:
contents: read
issues: read

jobs:
check-todos:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Setup Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.12"

- name: Install Task
uses: go-task/setup-task@01a4adf9db2d14c1de7a560f09170b6e0df736aa # v2.1.0

- name: Check TODOs
run: task check:todos
env:
GH_TOKEN: ${{ github.token }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ jobs:
- name: Determine whether to run with coverage
shell: bash
run: |
SERVER_TYPE=$(jq -r '.server_type' dev/coverage/coverage-baseline.json)
SERVER_VERSION=$(jq -r '.server_version' dev/coverage/coverage-baseline.json)
SERVER_TYPE=$(jq -r '.server_type' dev/conf/coverage-baseline.json)
SERVER_VERSION=$(jq -r '.server_version' dev/conf/coverage-baseline.json)

RUN_COVERAGE=false
if [[ "${{ matrix.dotnet }}" == "8.0" \
Expand Down
22 changes: 6 additions & 16 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,6 @@ Common commands:
- `task test coverage=true` (collect), `task coverage:report` (generate)
- Coverage results go to `dev/coverage/results/`; reports to `dev/coverage/reports/`

## Lint and Format Rules (Agents)

- Prefer `task` commands for linting and formatting.
- Lint checks (read-only, fail on issues):
- `task lint` (all checks), `task lint:rust`, `task lint:csharp`, `task lint:yaml`, `task lint:actions`, `task lint:markdown`
- Auto-fix formatting:
- `task format` (all languages), `task format:rust`, `task format:csharp`, `task format:yaml`, `task format:markdown`
- Link checking (separate from lint, slower):
- `task check-links`
Comment thread
currantw marked this conversation as resolved.

## Contribution Requirements

### Developer Certificate of Origin (DCO) Signoff
Expand Down Expand Up @@ -159,12 +149,12 @@ Note: Conventional Commits apply to commit messages only. Do not enforce this fo

## Quality Gates (Agent Checklist)

- [ ] Build passes
- [ ] Format passes
- [ ] Lint passes
- [ ] All unit tests pass
- [ ] Relevant integration tests pass
- [ ] Documentation examples compile
- [ ] Build passes (`task build`)
- [ ] [Formatting](DEVELOPER.md#formatting) passes (`task format`)
- [ ] [Linting](DEVELOPER.md#linting) passes (`task lint`)
- [ ] [Checks](DEVELOPER.md#checks) pass (`task check`)
- [ ] All unit tests pass (`task test:unit`)
- [ ] Relevant integration tests pass (`task test:integration`)
- [ ] Public API changes respect StackExchange.Redis compatibility.
- [ ] All commits include DCO signoff.

Expand Down
72 changes: 47 additions & 25 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,7 @@ task coverage:clean # Remove coverage results and reports
# Linting and formatting
task lint # Run all linters
task format # Run all formatters
task check-links # Check for broken links

task check # Run all checks
```

## Advanced Testing Options
Expand Down Expand Up @@ -339,34 +338,57 @@ To run [DNS tests](tests/Valkey.Glide.IntegrationTests/DnsTests.cs) locally:

If the environment variable is not set, DNS tests will be skipped.

## Linting and Formatting
## Formatting

Run automated formatters to ensure consistent code style.

```bash
task format # Run all formatters
task format:rust # Run Rust formatter
task format:csharp # Run C# formatter
task format:yaml # Run YAML formatter
task format:markdown # Run Markdown formatter
```

## Linting

Run linters to catch style issues and static analysis warnings.

```bash
task lint # Run all linters
task lint:rust # Run Rust linter
task lint:csharp # Run C# linter
task lint:yaml # Run YAML linter
task lint:actions # Run GitHub Actions linter
task lint:markdown # Run Markdown linter
```

## Checks

Before making a contribution, ensure that all new user APIs and non-obvious code is well documented, and run the code linters and analyzers.
Run checks to validate examples, links, and TODOs.

```bash
# Run all linters:
task lint

# Run linters for specific languages:
task lint:rust # Run Rust linting
task lint:csharp # Run C# linting
task lint:yaml # Run YAML linting
task lint:actions # Run GitHub Actions linting
task lint:markdown # Run Markdown linting

# Run all formatters:
task format

# Run formatters for specific languages:
task format:rust
task format:csharp
task format:yaml
task format:markdown

# Check for broken links
task check-links
task check
task check:examples
task check:links
task check:todos
```

### TODOs

All TODOs must follow the format `TODO #<number>: <description>`, where:

- `<number>` is an open GitHub issue in this repository.
- `<description>` is a short explanation of what needs to change (at least 10 characters).

Example:

```csharp
// TODO #472: Auto-generate this enum from the Rust source.
```

Files can be excluded from validation via `dev/conf/check-todos-ignore` (fnmatch glob patterns, one per line).

## Test framework and Style

The CSharp Valkey-Glide client uses xUnit v3 for testing code. The test code styles are defined in `.editorconfing` (see `dotnet_diagnostic.xUnit..` rules). The xUnit rules are enforced by the [xUnit analyzers](https://github.com/xunit/xunit.analyzers) referenced in the main xunit.v3 NuGet package. If you choose to use xunit.v3.core instead, you can reference xunit.analyzers explicitly. For additional info, please, refer to <https://xunit.NET> and <https://github.com/xunit/xunit>
Expand Down
27 changes: 19 additions & 8 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ tasks:

lint:yaml:
desc: "Run YAML linting"
cmd: npx prettier --check "**/*.yml"
cmd: npx --yes prettier --check "**/*.yml"
Comment thread
currantw marked this conversation as resolved.

lint:actions:
desc: "Run GitHub Actions linting"
cmd: actionlint

lint:markdown:
desc: "Run Markdown linting"
cmd: npx markdownlint-cli2 "**/*.md"
cmd: npx --yes markdownlint-cli2 "**/*.md"

# Format
# --------------------------------------------------------------------------------
Expand All @@ -158,19 +158,30 @@ tasks:

format:yaml:
desc: "Run YAML formatting"
cmd: npx prettier --write --cache "**/*.yml"
cmd: npx --yes prettier --write --cache "**/*.yml"

format:markdown:
desc: "Run Markdown formatting"
cmd: npx markdownlint-cli2 --fix "**/*.md"
cmd: npx --yes markdownlint-cli2 --fix "**/*.md"

# Additional checks
# --------------------------------------------------------------------------------

check-links:
check:
desc: "Run all checks"
deps:
- check:examples
- check:links
- check:todos

check:examples:
desc: "Check C# examples in comments"
cmd: python3 dev/scripts/check_examples.py

check:links:
desc: "Check for broken links"
cmd: lychee --config lychee.toml .

check-examples:
desc: "Check C# examples in doc comments"
cmd: python3 dev/scripts/check_examples.py
check:todos:
desc: "Check that TODOs reference an open GitHub issue"
cmd: python3 dev/scripts/check_todos.py
8 changes: 8 additions & 0 deletions dev/conf/check-todos-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Files excluded from the TODO checker.
# Patterns use fnmatch-style glob matching.
# Only full-line comments supported.
# See dev/scripts/check_todos.py for details.

dev/conf/check-todos-ignore
dev/scripts/check_todos.py
DEVELOPER.md
Comment thread
currantw marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"server_type": "valkey",
"server_version": "9.0",
"line_coverage": 71.4,
"branch_coverage": 52.1
"branch_coverage": 51.9
}
File renamed without changes.
8 changes: 6 additions & 2 deletions dev/scripts/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@
# Paths
# ---------------------------------------------------------------------------

GITHUB_REPO = "valkey-io/valkey-glide-csharp"

SCRIPTS_DIR = os.path.dirname(os.path.abspath(__file__))
PROJECT_ROOT = os.path.dirname(os.path.dirname(SCRIPTS_DIR))
SOURCES_DIR = os.path.join(PROJECT_ROOT, "sources")
LIBRARY_DIR = os.path.join(SOURCES_DIR, "Valkey.Glide")

CONF_DIR = os.path.join(PROJECT_ROOT, "dev", "conf")
COVERAGE_BASELINE_PATH = os.path.join(CONF_DIR, "coverage-baseline.json")
COVERAGE_RUNSETTINGS_PATH = os.path.join(CONF_DIR, "coverage-runsettings.xml")

COVERAGE_DIR = os.path.join(PROJECT_ROOT, "dev", "coverage")
COVERAGE_RESULTS_DIR = os.path.join(COVERAGE_DIR, "results")
COVERAGE_REPORTS_DIR = os.path.join(COVERAGE_DIR, "reports")
COVERAGE_BASELINE_PATH = os.path.join(COVERAGE_DIR, "coverage-baseline.json")
COVERAGE_RUNSETTINGS_PATH = os.path.join(COVERAGE_DIR, ".runsettings")

COVERAGE_REPORTS_COMBINED_DIR = os.path.join(COVERAGE_REPORTS_DIR, "combined")
COVERAGE_REPORT_COMBINED_INDEX_PATH = os.path.join(
Expand Down
5 changes: 4 additions & 1 deletion dev/scripts/check_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

"""Check code examples by extracting and compiling them.

Extracts C# code examples from XML doc comments in the source tree, then
compiles each against the built Valkey.Glide DLL to verify correctness.

Usage:
python scripts/check_examples.py
python dev/scripts/check_examples.py
"""

import os
Expand Down
Loading
Loading