Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .editorconfig and format files #20

Merged
merged 1 commit into from
Oct 27, 2021
Merged

Add .editorconfig and format files #20

merged 1 commit into from
Oct 27, 2021

Conversation

dliu-workos
Copy link
Contributor

No description provided.

.editorconfig Outdated
[*.{kt,kts}]
charset = utf-8
indent_style = space
indent_size = 2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marktran gave some feedback around using 2 spaces instead of 4

I lean towards 2 spaces. The old "java" way was 4.

Google's style guide is 2: https://github.com/search?p=3&q=.editorconfig++%5B%2A.%7Bkt%2Ckts%7D%5D+indent_size&type=Code

Looking through Github, there's a mix of 2/4...lots of folks have their editors set to 2 spaces by default but make an exception for java/groovy/kotlin and set it to 4

https://github.com/search?p=4&q=.editorconfig++%5B%2A.%7Bkt%2Ckts%7D%5D+indent_size&type=Code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely prefer 2, so this is 👍🏻

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw in a thread that Pinterest, Square, Trello, Google also use Kotlin and they're 2 space gang.

pinterest/ktlint#43

Copy link
Contributor

@robframpton robframpton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, looks like you'll need to rerun against SsoApi.kt

@dliu-workos dliu-workos enabled auto-merge (squash) October 27, 2021 23:41
@dliu-workos dliu-workos merged commit 3cc2082 into main Oct 27, 2021
@dliu-workos dliu-workos deleted the editorconfig branch October 27, 2021 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants