Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

re-enable sql linter (#7561)

Shahmir Varqhae5af6ef52183
diff --git a/frontend/src/components/app-config/data-form.tsx b/frontend/src/components/app-config/data-form.tsx
index cba0242de1..0bdaf8e73a 100644
--- a/frontend/src/components/app-config/data-form.tsx
+++ b/frontend/src/components/app-config/data-form.tsx
@@ -13,6 +13,7 @@ import {
import { NativeSelect } from "@/components/ui/native-select";
import { NumberField } from "@/components/ui/number-field";
import type { UserConfig } from "@/core/config/config-schema";
+import { Checkbox } from "../ui/checkbox";
import {
formItemClasses,
SettingGroup,
@@ -212,8 +213,7 @@ export const DataForm = ({
{renderDiscoveryForm("datasources.auto_discover_columns", "Columns")}
</div>
- {/* TODO: Issue with frontend being stuck */}
- {/* <FormField
+ <FormField
control={form.control}
name="diagnostics.sql_linter"
render={({ field }) => (
@@ -238,7 +238,7 @@ export const DataForm = ({
</FormDescription>
</div>
)}
- /> */}
+ />
<FormField
control={form.control}
diff --git a/frontend/src/core/codemirror/language/languages/sql/sql.ts b/frontend/src/core/codemirror/language/languages/sql/sql.ts
index a479d061c2..5e8f80b384 100644
--- a/frontend/src/core/codemirror/language/languages/sql/sql.ts
+++ b/frontend/src/core/codemirror/language/languages/sql/sql.ts
@@ -137,7 +137,7 @@ export class SQLLanguageAdapter
_completionConfig: CompletionConfig,
_hotkeys: HotkeyProvider,
_placeholderType: PlaceholderType,
- _lspConfig: LSPConfig & { diagnostics: DiagnosticsConfig },
+ lspConfig: LSPConfig & { diagnostics: DiagnosticsConfig },
): Extension[] {
const extensions = [
// This can be updated with a dispatch effect
@@ -168,8 +168,7 @@ export class SQLLanguageAdapter
}),
];
- // TODO: Issue with frontend being stuck
- const sqlLinterEnabled = false;
+ const sqlLinterEnabled = lspConfig?.diagnostics?.sql_linter ?? false;
if (sqlLinterEnabled) {
const theme = store.get(resolvedThemeAtom);