libgdx / gdx-liftoff

A modern setup tool for libGDX Gradle projects
Apache License 2.0
538 stars 50 forks source link

Changed tabs to spaces #115

Closed czyzby closed 1 year ago

czyzby commented 1 year ago
Frosty-J commented 1 year ago

The style guide says four spaces should be used. This looks like two? (though I personally prefer two...)

czyzby commented 1 year ago

Good catch, though I also find 2 readable enough and better for DSLs. For the record, I used 4 in the generated Java sources.

I'll leave it up to @tommyettinger whether we want to go for 2 or 4. We could consider using 2 throughout the gdx-liftoff and 4 in the generated projects.

czyzby commented 1 year ago

I went ahead and changed the indent to 4 in the generated sources, also fixing some templates that I've missed along the way. I've also added .editorconfig to the generated projects, so that the IDE will automatically apply at least some of the appropriate formatting. The gdx-liftoff project itself is still at 2, which I personally think is reasonable with Kotlin.

tommyettinger commented 1 year ago

4 seems best for consistency, all around, but I'm totally fine if the liftoff sources use 2. I find both readable, and if the linter understands it, then using 4 spaces for generated sources should be enough to pass style guides.

czyzby commented 1 year ago

I find both readable, and if the linter understands it, then using 4 spaces for generated sources should be enough to pass style guides.

The file templates are mostly in strings, and those do not have to follow the style guide (their contents not considered as project's sources other than as multiline strings, and the formatter has no business changing the string values throughout the application).

tommyettinger commented 1 year ago

Looks good, I think we should be fine with this as it is now. Thanks!