vscode-terraform icon indicating copy to clipboard operation
vscode-terraform copied to clipboard

Enable users to configure linter settings in VS Code

Open dbanck opened this issue 3 years ago • 0 comments

This is part of https://github.com/hashicorp/vscode-terraform/issues/635

Problem Statement

To allow a more straightforward configuration of linter settings for the language server, we expose those settings via the VS Code settings UI to the user.

We want to support running multiple linters simultaneously, so each supported linter will get an extra section for settings.

Expected User Experience

The settings UI for configuring a lint tool could look something like this:

CleanShot 2022-01-19 at 14 17 08

With an extra headline above and tflint specific wording.

A user should be able to specify:

  • A path to the binary
  • Arguments for the binary
  • When to run the binary, e.g. on save or off

Proposal

  • Extend the contributes object inside the package.json with the new settings UI
    • The keys for the new settings might look like:
      • terraform.languageServer.linters.tflint.binaryPath
      • terraform.languageServer.linters.tflint.binaryFlags
      • terraform.languageServer.linters.tflint.lintOnSave
  • Pass the settings to the language server on initialization

dbanck avatar Apr 07 '22 12:04 dbanck