amplitude / amplitude/homebrew-ampli

Ampli CLI generate invalid Swift code when an identifier starts with a number

Aperta
#8 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Ruby
Stelle
2
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

In my case the product manager defined a property called `1Year`. In this case amply generate the following enum

```
public enum Duration: String {
case 1Year = "1Year"
}
```

`1Year` is an invalid swift identifier.

Ampli should generate a valid identified by prefixing the value stating with a number by a valid character, for example `case _1Year = "1Year"`

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.