Skip to content

Commit 6cb789d

Browse files
committed
Merge PR barklan#119
2 parents 37c0de9 + b04e1d7 commit 6cb789d

4 files changed

Lines changed: 12 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ Integration with real database is available and controlled through VSCode option
111111
"inlineSQL.dbHost": "localhost",
112112
"inlineSQL.dbPort": 5432,
113113
"inlineSQL.dbUser": "postgres",
114-
"inlineSQL.dbPassword": "postgres"
114+
"inlineSQL.dbPassword": "postgres",
115+
"inlineSQL.lint": true
115116
}
116117
```
117118

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@
186186
"default": "postgres",
187187
"markdownDescription": "Database password."
188188
},
189+
"inlineSQL.lint": {
190+
"type": "boolean",
191+
"default": true,
192+
"markdownDescription": "Disable lint, use only syntax highlighting."
193+
},
189194
"inlineSQL.lintSQLFiles": {
190195
"type": "boolean",
191196
"default": false,

src/configuration.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export type Configuration = {
1515
dbUser: string;
1616
dbPassword: string;
1717
lintSQLFiles: boolean;
18+
lint: boolean;
1819
};
1920

2021
export function getConfiguration() {

src/extension.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ async function checkRange(
1313
): Promise<vscode.Diagnostic[]> {
1414
const diagnostics: vscode.Diagnostic[] = [];
1515

16+
if (!configuration.get('lint')) {
17+
return diagnostics;
18+
}
19+
1620
const sqlStr = doc.getText(range);
1721

1822
let errors = null;

0 commit comments

Comments
 (0)