CloudFormation formatter does not respect chosen indentation
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
https://github.com/aws/aws-toolkit-vscode/blob/22be93735bb20c22cefaef407ecfef7d7b7f72b9/packages/core/src/awsService/cloudformation/commands/cfnCommands.ts#L343
This is hardcoded to `2` regardless of the indentation chosen in the VSCode editor.
## Expected
When I pick a certain indentation in VSCode, I expect the formatter to respect it.
## Actual
When formatting CloudFormation YAML file, the items are reindented using a "tab" size of 2, even when I selected indentation size 4. When I have all my CloudFormation YAMLs with a certain indentation size, enabling this VSCode extension suddenly changes the entire file, forcing me to enable/disable the extension to avoid unnecessary churn on files.
Contributor guide
Research direction
Start at packages/core/src/awsService/cloudformation/commands/cfnCommands.ts, around line 343, where the issue says indentation is hardcoded to 2. Check how the formatter can access the VSCode editor's chosen indentation; done means formatting a CloudFormation YAML file respects the selected size, including size 4.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode, yaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100