Skip to content

Commit

Permalink
v3.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertOstermann committed Jul 19, 2024
1 parent c06d99d commit eb3717b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
7 changes: 0 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@
"simple-import-sort/exports": "error",
"tsdoc/syntax": "warn",
// other
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "always-multiline"
}],
"eol-last": "error",
"no-unused-vars": "off",
"no-trailing-spaces": "error",
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to the "sqlfluff" extension will be documented in this file.

## [3.1.2] - 2024-07-19

- Attempt to fix "File path not found" [Issue](https://github.com/sqlfluff/vscode-sqlfluff/issues/147)
- Datacoves' dbt-core-interface improvements + new response. Thanks to BAntonellini's [Pull Request](https://github.com/sqlfluff/vscode-sqlfluff/pull/144)
- Prevent "Specified path does not exist" error for empty untitled files. Thanks to jackfrey13's [Pull Request](https://github.com/sqlfluff/vscode-sqlfluff/pull/149)

## [3.1.1] - 2024-07-10

- Show the rule name in the problems tab [Issue](https://github.com/sqlfluff/vscode-sqlfluff/issues/134)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vscode-sqlfluff",
"displayName": "sqlfluff",
"version": "3.1.1",
"version": "3.1.2",
"description": "A linter and auto-formatter for SQLfluff, a popular linting tool for SQL and dbt.",
"publisher": "dorzey",
"icon": "images/icon.png",
Expand Down
6 changes: 3 additions & 3 deletions src/features/providers/formatter/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class FormattingProvider implements vscode.DocumentFormattingEditProvider
async provideDocumentFormattingEdits(
document: vscode.TextDocument,
options: vscode.FormattingOptions,
token: vscode.CancellationToken,
token: vscode.CancellationToken
): Promise<vscode.TextEdit[]> {
const filePath = Utilities.normalizePath(document.fileName);
const workspaceFolder = vscode.workspace.workspaceFolders
Expand Down Expand Up @@ -57,7 +57,7 @@ export class FormattingProvider implements vscode.DocumentFormattingEditProvider
workingDirectory,
CommandType.FIX,
Configuration.formatFileArguments(),
commandOptions,
commandOptions
);

if (!result.succeeded) {
Expand Down Expand Up @@ -99,7 +99,7 @@ export class FormattingProvider implements vscode.DocumentFormattingEditProvider
workingDirectory,
CommandType.FIX,
Configuration.formatFileArguments(),
commandOptions,
commandOptions
);

if (!result.succeeded) {
Expand Down
8 changes: 4 additions & 4 deletions src/features/providers/linter/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class LintingProvider {
delete this.delayers[textDocument.uri.toString()];
},
null,
subscriptions,
subscriptions
);
}

Expand Down Expand Up @@ -89,7 +89,7 @@ export default class LintingProvider {
textDocument?: vscode.TextDocument,
currentDocument = false,
forceLint = false,
workspacePath?: string,
workspacePath?: string
): void {
if (
(textDocument && !this.linter.languageId.includes(textDocument.languageId)) ||
Expand Down Expand Up @@ -120,14 +120,14 @@ export default class LintingProvider {
public async doLint(
document?: vscode.TextDocument,
currentDocument?: boolean,
workspacePath?: string,
workspacePath?: string
): Promise<void> {
const workspaceFolder = vscode.workspace.workspaceFolders
? vscode.workspace.workspaceFolders[0].uri.fsPath
: undefined;
const rootPath = workspaceFolder ? Utilities.normalizePath(workspaceFolder) : undefined;
const workingDirectory = workspacePath ?? Configuration.workingDirectory(rootPath);
const filePath = document && !document.isUntitled ? Utilities.normalizePath(document.fileName) : workingDirectory;
const filePath = document && document.fileName ? Utilities.normalizePath(document.fileName) : workingDirectory;

if (!filePath) {
Utilities.outputChannel.appendLine("ERROR: File path not found.");
Expand Down
1 change: 1 addition & 0 deletions src/features/providers/sqlfluff.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-async-promise-executor */
import * as CProcess from "child_process";
import * as path from "path";
import { StringDecoder } from "string_decoder";
Expand Down

0 comments on commit eb3717b

Please sign in to comment.