hhvm / hack-codegen

Library to programatically generate Hack code and write it to signed files
https://hhvm.github.io/hack-codegen/
MIT License
341 stars 93 forks source link

Don't append a trailing comma to the last param in row #97

Closed usox closed 6 years ago

usox commented 6 years ago

Fixes #96

usox commented 6 years ago

I was looking for a more generic solution because it feels a bit hacky to recognize variadics...but ok.

fredemmott commented 6 years ago

the reason is that one of the purposes of trailing commas is to preserve ‘git blame’ when adding new parameters/items

usox commented 6 years ago

Phew, i was not aware of that.... Maybe it's worth to make the params configurable instead of adding some special treatment for variadics in here...

fredemmott commented 6 years ago

We should consider refactoring parameters to not be string-based,