cfn-lint-visual-studio-code icon indicating copy to clipboard operation
cfn-lint-visual-studio-code copied to clipboard

More intelligent handling of yaml.customTags configuration

Open ralish opened this issue 4 years ago • 0 comments

The extension's preferred yaml.customTags configuration is unconditionally added to the user's global VS Code settings if the yaml.customTags setting isn't already present with the precise configuration the extension expects. This has several problems:

  1. The setting may already be defined at a different scope (e.g. in a workspace configuration). If present in a workspace, it does appear to be respected (not certain though!), but the configuration setting will be added to the user's global VS Code settings regardless (resulting in duplication).
  2. If the setting is already present in the user's global VS Code settings, but doesn't match exactly what the extension expects, it will outright replace the current configuration for the setting with its own. This may result in loss of other custom tags which are defined, as well as any sorting of the tags.
  3. The user should be prompted to update their configuration (which the extension can do for them) if the setting is not present, and their response recorded to avoid subsequent prompts. Modifying their personal settings without any prompt is somewhat user hostile. It's extra annoying when the configuration is tracked using Git or another VCS, resulting in the file being marked as dirty due to unexpected and possibly unwanted modifications.

ralish avatar Jan 24 '22 23:01 ralish