Closed czyzby closed 1 year ago
The style guide says four spaces should be used. This looks like two? (though I personally prefer two...)
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.
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.
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.
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).
Looks good, I think we should be fine with this as it is now. Thanks!
.editorconfig
to reflect the changes.ktlint
.ktlint
check to the build GitHub action..editorconfig
generation.AdvancedProjectData
, but keep in mind they are not hooked up to the UI yet, and changing the indent programmatically does not reformat the generated sources (it only affects the.editorconfig
settings).