aws-amplify / aws-amplify/amplify-cli

Standardize use of whitespace, tab width in generated template files

Open
#7,635 2 comments 0 reactions 0 assignees View on GitHub
feature-request p4 platform
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### Is this related to a new or existing Amplify category?

_No response_

### Is this related to another service?

_No response_

### Describe the feature you'd like to request

Some auto-generated files include extraneous whitespace, and in some cases tab width is different across files (typically 2 and 4 spaces)

Example 1 (whitespace): CloudFormation YML Snippet

```yml
identityPoolName:
Type: String



allowUnauthenticatedIdentities:
Type: String

resourceNameTruncated:
Type: String


userPoolName:
Type: String



autoVerifiedAttributes:
Type: CommaDelimitedList

mfaConfiguration:
Type: String



mfaTypes:
Type: CommaDelimitedList

smsAuthenticationMessage:
Type: String


smsVerificationMessage:
Type: String
```

Example 2 (tab width = 4): Lambda CloudFormation JSON Snippet

```json
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Lambda Function resource stack creation using Amplify CLI",
"Parameters": {
"CloudWatchRule": {
"Type": "String",
"Default" : "NONE",
"Description" : " Schedule Expression"
},
"deploymentBucketName": {
"Type": "String"
},
"env": {
"Type": "String"
},
"s3Key": {
"Type": "String"
}

},
"Conditions": {
"ShouldNotCreateEnvResources": {
"Fn::Equals": [
{
"Ref": "env"
},
"NONE"
]
}
},
```

### Describe the solution you'd like

Remove extraneous horizontal whitespace and consolidate/standardize tab width size to 2

### Describe alternatives you've considered

n/a

### Additional context

_No response_

### Is this something that you'd be interested in working on?

- [ ] 👋 I may be able to implement this feature request
- [ ] ⚠️ This feature might incur a breaking change

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.