From b94356dfb799961a6239fc0a6322a1bc2af91958 Mon Sep 17 00:00:00 2001 From: Conrad Kramer Date: Fri, 26 May 2023 22:04:34 -0400 Subject: [PATCH] Set clippy as the default build task Also configure CodeLLDB as a recommended extension. --- .vscode/extensions.json | 3 ++- .vscode/settings.json | 12 ++++++++++-- .vscode/tasks.json | 12 +++++++++--- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index c5c0dd4..e40eae1 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,6 @@ { "recommendations": [ "rust-lang.rust-analyzer", + "vadimcn.vscode-lldb", ] -} +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 55c07df..649e121 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,10 +6,18 @@ "files.trimTrailingWhitespace": true, "editor.suggest.preview": true, "editor.acceptSuggestionOnEnter": "on", - "rust-analyzer.checkOnSave.command": "clippy", "rust-analyzer.restartServerOnConfigChange": true, "rust-analyzer.cargo.features": "all", + "rust-analyzer.check.overrideCommand": [ + "cargo", + "clippy", + "--fix", + "--workspace", + "--message-format=json", + "--all-targets", + "--allow-dirty" + ], "[rust]": { "editor.defaultFormatter": "rust-lang.rust-analyzer", }, -} +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index eb2a68a..3eb24be 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -3,7 +3,7 @@ "tasks": [ { "type": "cargo", - "command": "check", + "command": "clippy", "problemMatcher": [ "$rustc" ], @@ -11,7 +11,13 @@ "kind": "build", "isDefault": true }, - "label": "Check" - } + "label": "rust: cargo clippy", + "args": [ + "--workspace", + "--all-targets", + "--all-features", + "--all" + ] + }, ] } \ No newline at end of file