Add wsl linter and fix

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-19 14:51:08 +04:00
parent eedfdcecc8
commit 9156d6a16a
882 changed files with 6068 additions and 574 deletions

View File

@@ -64,6 +64,7 @@ func TestBuildToolNameSet(t *testing.T) {
set := buildToolNameSet([]string{"delete", "update", "create"})
assert.Len(t, set, 3)
for _, name := range []string{"delete", "update", "create"} {
_, ok := set[name]
assert.True(t, ok, "expected set to contain %q", name)
@@ -165,15 +166,19 @@ func TestApprovalConfig_RequiresApproval(t *testing.T) {
t.Parallel()
type ctxKey struct{}
ctx := context.WithValue(context.Background(), ctxKey{}, "marker")
var capturedCtx context.Context
var capturedTC llm.ToolCall
var (
capturedCtx context.Context
capturedTC llm.ToolCall
)
c := &ApprovalConfig{
ShouldApprove: func(ctx context.Context, tc llm.ToolCall) bool {
capturedCtx = ctx
capturedTC = tc
return true
},
}