Open
Description
This is part of hashicorp/vscode-terraform#635
Use-cases
To enable the integration of linters within the language server, we need to accept a set of configurations upon initialization.
Proposal
- Extend the initialization properties with the linter related configuration.
terraform-ls/internal/langserver/handlers/initialize.go
Lines 59 to 71 in f246688
- Each linter will have a dedicated section in the configuration
- The first linter we plan to support is
tflint
, new options might look like this:options.linters.tflint.binaryPath
options.linters.tflint.binaryFlags
options.linters.tflint.lintOnSave
- Validate the linter configuration and check if the passed binary is accessible and executable
- If validation fails, fail silently and disable any internal linting code
- If validation succeeds, the linters can be consumed on safe or via a command (separate issues)