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

Stale diagnostics for *.json files #705

Open
dbanck opened this issue Nov 9, 2021 · 0 comments
Open

Stale diagnostics for *.json files #705

dbanck opened this issue Nov 9, 2021 · 0 comments

Comments

@dbanck
Copy link
Member

dbanck commented Nov 9, 2021

Context

With support for *.tf.json files (introduced in #498) and support for *.tfvars.json files (introduced in #519), we are now publishing diagnostics for those kinds of files, too.

Expected Behavior

When changing/opening/closing a terraform JSON file, we should publish updated diagnostics to avoid stale diagnostics.

Actual Behavior

Diagnostics for any JSON files (*.tf.json, *.tfvars.json) are only published, when a *.tf is changed/opened/closed in the corresponding module. Fixing an issue inside a JSON file will not trigger an update.

CleanShot 2021-11-09 at 11 30 28@2x

valid JSON file, stale problems

Steps to Reproduce

  1. Create an invalid *.tf.json or *.tfvars.json file:
{
  "image_id": "ami-abc123",
  "availability_zone_names": ["us-west-1a", "us-west-1c"]
  1. Open a *.tf file in the same module.
  2. Fix the error in the JSON file.
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

3 participants