You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We introduced enhanced validation in hashicorp/terraform-ls#1368 We took care to only focus on 100% wrong syntax and avoid opinionated validation, such that users do not feel the need to tweak anything about this configuration and what's highlighted as wrong is always "indisputably wrong".
We have received feedback from folks who use some techniques and tools to effectively produce "expected invalid configuration". While this is not something we intend to support and users were advised to simply stop producing invalid configuration, there are some pragmatic steps we can take to still provide some validation to those users, rather than making them turn it off entirely.
Introduce new boolean settings options under terraform.validation section, for example terraform.validation.unexpectedAttribute or terraform.validation.unreferencedOrigins etc. to allow the users to turn each validator on or off.
Stretch goal - File Filtering
We could also consider accepting glob patterns or file paths to include/exclude but this would need to be considered carefully. I'm sure we have had this request before for other reasons and I think we should 1st understand why people would really want this.
By making exclusion/inclusion a validation only feature just hides the most visible problem but leaves users exposed to other IDE features (completion, hover etc.) which are also powered by all the same data as validation and if users wan't to turn off validation for particular files because the data to support the validation is unavailable or inaccurate then we should consider this as a more holistic feature and turn on/off the other IDE help too, not just validation.
The text was updated successfully, but these errors were encountered:
Background
We introduced enhanced validation in hashicorp/terraform-ls#1368 We took care to only focus on 100% wrong syntax and avoid opinionated validation, such that users do not feel the need to tweak anything about this configuration and what's highlighted as wrong is always "indisputably wrong".
We have received feedback from folks who use some techniques and tools to effectively produce "expected invalid configuration". While this is not something we intend to support and users were advised to simply stop producing invalid configuration, there are some pragmatic steps we can take to still provide some validation to those users, rather than making them turn it off entirely.
See
Proposal
Introduce new boolean settings options under
terraform.validation
section, for exampleterraform.validation.unexpectedAttribute
orterraform.validation.unreferencedOrigins
etc. to allow the users to turn each validator on or off.Stretch goal - File Filtering
We could also consider accepting glob patterns or file paths to include/exclude but this would need to be considered carefully. I'm sure we have had this request before for other reasons and I think we should 1st understand why people would really want this.
By making exclusion/inclusion a validation only feature just hides the most visible problem but leaves users exposed to other IDE features (completion, hover etc.) which are also powered by all the same data as validation and if users wan't to turn off validation for particular files because the data to support the validation is unavailable or inaccurate then we should consider this as a more holistic feature and turn on/off the other IDE help too, not just validation.
The text was updated successfully, but these errors were encountered: