Skip to content

Commit 3b4f9eb

Browse files
anandgupta42claude
andcommitted
fix: remove unnecessary undefined as any casts for optional schema_context
`schema_context` is already optional (`?`) in the Dispatcher types. The `undefined as any` casts were unnecessary type safety bypasses. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7c77d26 commit 3b4f9eb

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

packages/opencode/src/cli/cmd/check.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ async function runLint(sql: string, file: string, schemaPath?: string): Promise<
3636
const result = await Dispatcher.call("altimate_core.lint", {
3737
sql,
3838
schema_path: schemaPath ?? "",
39-
schema_context: undefined as any,
4039
})
4140
if (!result.success) {
4241
return [dispatcherErrorFinding("lint", file, result.error ?? "altimate_core.lint failed")]
@@ -63,7 +62,6 @@ async function runValidate(sql: string, file: string, schemaPath?: string): Prom
6362
const result = await Dispatcher.call("altimate_core.validate", {
6463
sql,
6564
schema_path: schemaPath ?? "",
66-
schema_context: undefined as any,
6765
})
6866
if (result.success) return []
6967
const errors = (result.data.errors ?? result.data.findings ?? []) as Array<Record<string, unknown>>
@@ -135,7 +133,6 @@ async function runPolicy(sql: string, file: string, policyJson: string, schemaPa
135133
sql,
136134
policy_json: policyJson,
137135
schema_path: schemaPath ?? "",
138-
schema_context: undefined as any,
139136
})
140137
if (result.success && result.data.allowed !== false) return []
141138
const violations = (result.data.violations ?? result.data.findings ?? []) as Array<Record<string, unknown>>
@@ -173,7 +170,6 @@ async function runPii(sql: string, file: string, schemaPath?: string): Promise<F
173170
const result = await Dispatcher.call("altimate_core.query_pii", {
174171
sql,
175172
schema_path: schemaPath ?? "",
176-
schema_context: undefined as any,
177173
})
178174
if (!result.success) {
179175
return [dispatcherErrorFinding("pii", file, result.error ?? "altimate_core.query_pii failed")]
@@ -200,7 +196,6 @@ async function runSemantic(sql: string, file: string, schemaPath?: string): Prom
200196
const result = await Dispatcher.call("altimate_core.semantics", {
201197
sql,
202198
schema_path: schemaPath ?? "",
203-
schema_context: undefined as any,
204199
})
205200
if (result.success && result.data.valid !== false) return []
206201
const issues = (result.data.issues ?? result.data.findings ?? []) as Array<Record<string, unknown>>
@@ -242,7 +237,6 @@ async function runGrade(
242237
const result = await Dispatcher.call("altimate_core.grade", {
243238
sql,
244239
schema_path: schemaPath ?? "",
245-
schema_context: undefined as any,
246240
})
247241
const issues = (result.data.issues ?? result.data.findings ?? result.data.recommendations ?? []) as Array<
248242
Record<string, unknown>

0 commit comments

Comments
 (0)