Consider adding one more indentation after if
- Dominant language
- Jsonnet
- Stars
- 7.6k
- Forks
- 475
- PR merge metrics
- No merged PRs in 30d
Description
Please consider the following different ways of writing if
```
{
replicas: {
build: if isCanary then 0
else 1,
dev: if isCanary then
0
else
1,
prod: if isCanary
then 0
else 1,
perf: if isCanary
then
0
else
1,
},
}
```
`jsonnet fmt` aligns `then` and `else` with the key name.
Did you consider adding one more indent to the blocks starting with `then` and `else`.
How about the following indentation assuming `--indent 4` is passed to `jsonnet fmt`
```
{
replicas: {
build: if isCanary then 0
else 1,
dev: if isCanary then
0
else
1,
prod: if isCanary
then 0
else 1,
perf: if isCanary
then
0
else
1,
},
}
```
Contributor guide
Assessment
This issue has not been assessed yet.