Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta: Support for external linters #635

Open
danieldreier opened this issue May 18, 2021 · 0 comments
Open

meta: Support for external linters #635

danieldreier opened this issue May 18, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request linting Functionality related to linting and external linters meta needs-research

Comments

@danieldreier
Copy link

danieldreier commented May 18, 2021

Problem Statement

Many advanced users of Terraform leverage a number of external tools, to help them e.g.

  • find unused declarations
  • enforce best practices or naming conventions
  • enforce good security hygiene

Examples of tools

Such users would benefit from a more seamless integration with these tools, such that they don't need to leave the comfort of their IDE to run the tool and receive any relevant diagnostics natively - so they're able to address any problems quickly and easily.

Technical Details

While tools may each serve different purpose, they have something in common:

  • they all need to be installed and kept updated somehow; or found at a particular location via $PATH
  • they all need to be executed with particular file/dir path
  • most of them will output some kind of diagnostics associated with particular location in code

User Impact

Any users which use any of the above tools would benefit from closer integration.

See also

Expected User Experience

Users will be able to run the configured linters:

  • automatically on save
  • via the command palette, similar to how they're able to run terraform validate today

Screenshot 2021-05-19 at 13 49 08

Users will receive diagnostics in the Problems pane after the linter runs, similar to how they receive diagnostics for HCL syntax issues e.g.

Screenshot 2021-05-19 at 13 47 17

Proposal

It would make sense for the integration to take the above patterns into account and keep in mind possible further integrations that have such commonalities.

There is some potentially relevant prior art to be seen in the Go VS Code extension:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request linting Functionality related to linting and external linters meta needs-research
Projects
None yet
Development

No branches or pull requests

4 participants