From 83652b864ec08364435092277861c42d495570be Mon Sep 17 00:00:00 2001 From: Robbie Ostermann Date: Wed, 10 Jul 2024 14:27:21 -0500 Subject: [PATCH] v3.1.1 --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/features/linter.ts | 2 +- .../providers/linter/types/violation.ts | 17 +++++++++-------- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49ae0d1..8895831 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the "sqlfluff" extension will be documented in this file. +## [3.1.1] - 2024-07-10 + +- Show the rule name in the problems tab [Issue](https://github.com/sqlfluff/vscode-sqlfluff/issues/134) + ## [3.1.0] - 2024-07-03 - Allow the extension to accept warnings from the underlying linter. Thanks to TheCleric's [Pull Request](https://github.com/sqlfluff/vscode-sqlfluff/pull/140) diff --git a/package.json b/package.json index b0ccc37..82203b6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vscode-sqlfluff", "displayName": "sqlfluff", - "version": "3.1.0", + "version": "3.1.1", "description": "A linter and auto-formatter for SQLfluff, a popular linting tool for SQL and dbt.", "publisher": "dorzey", "icon": "images/icon.png", diff --git a/src/features/linter.ts b/src/features/linter.ts index f4fbe39..c268f26 100644 --- a/src/features/linter.ts +++ b/src/features/linter.ts @@ -66,7 +66,7 @@ export default class LinterProvider implements Linter { violation.description, diagnosticSeverity, ); - diagnostic.code = violation.code; + diagnostic.code = violation?.name ? `${violation.code}: ${violation.name}` : violation.code; diagnostic.source = "sqlfluff"; fileDiagnostic.diagnostics.push(diagnostic); }); diff --git a/src/features/providers/linter/types/violation.ts b/src/features/providers/linter/types/violation.ts index fbfc47d..30bc111 100644 --- a/src/features/providers/linter/types/violation.ts +++ b/src/features/providers/linter/types/violation.ts @@ -1,11 +1,12 @@ export default interface Violation { - line_no?: number, - line_pos?: number, - start_line_no?: number, - start_line_pos?: number, - end_line_no?: number, - end_line_pos?: number, - description: string, - code: string, + line_no?: number; + line_pos?: number; + start_line_no?: number; + start_line_pos?: number; + end_line_no?: number; + end_line_pos?: number; + description: string; + code: string; + name?: string; warning?: boolean; }