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

Report duplicate blocks #1590

Open
14 tasks
radeksimko opened this issue Jan 19, 2024 · 0 comments
Open
14 tasks

Report duplicate blocks #1590

radeksimko opened this issue Jan 19, 2024 · 0 comments

Comments

@radeksimko
Copy link
Member

Background

One of the common issues users face is that they end up with duplicate blocks. This can be a result of copy pasting or just complex module with many files that make it difficult to keep track of all blocks.

This concerns blocks which are addressable and need to be unique within the module "namespace":

  • check
  • data
  • locals
  • module
  • output
  • resource
  • variable

Proposal

  • Report duplicate check "<name>" as error
  • Report duplicate data ... "<name>" as error
  • Report duplicate locals entries as error
  • Report duplicate module ""` as error
  • Report duplicate output "<name>" as error
  • Report duplicate resource ... "<name>" as error
  • Report duplicate variable "<name>" as error
  • Provide quickfix code action to remove duplicate check "<name>"
  • Provide quickfix code action to remove duplicate data ... "<name>"
  • Provide quickfix code action to remove duplicate locals entries
  • Provide quickfix code action to remove duplicate module ""`
  • Provide quickfix code action to remove duplicate output "<name>"
  • Provide quickfix code action to remove duplicate resource ... "<name>"
  • Provide quickfix code action to remove duplicate variable "<name>"

Notes

We already track similar enhancement for tfvars entries:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant