Skip to content
This repository has been archived by the owner on Oct 16, 2018. It is now read-only.

Evaluate providing IntelliJ code style configuration #2

Open
JakeWharton opened this issue Oct 20, 2017 · 4 comments
Open

Evaluate providing IntelliJ code style configuration #2

JakeWharton opened this issue Oct 20, 2017 · 4 comments

Comments

@JakeWharton
Copy link
Contributor

Perhaps as a plugin so that it's constantly updating?

@scottroemeschke
Copy link

scottroemeschke commented Nov 2, 2017

If there's interest in this (before we get an auto-updating plugin) I'd be happy to get the base config file up. (it might not have every rule, I'll have to double check what will be supported by default in the code style setup, and if there's any custom intellij code that needs to be written for specific rules.)

I would also be down to write the plugin, but not sure where to host the file.

Could bundle the xml file with the plugin version, but that seems weird.

@willbuck
Copy link

willbuck commented Dec 1, 2017

@scottmeschke myself and @twbarber at Rocket Travel would love to an importable IntelliJ style rule set based on the Android Kotlin style guide (https://android.github.io/kotlin-guides/style.html), if this is something we could help with please reach out to us!

@shyiko
Copy link

shyiko commented Dec 1, 2017

For what it's worth, ktlint --android --apply-to-idea link (--android flag here enables Android Kotlin Style Guide compatibility) aims to provide this.

Not everything described in the https://android.github.io/kotlin-guides/style.html can be configured through Intellij Code Style / Inspections settings but the things that don't are enforced by the ktlint itself (unfortunately not all rules from the style guide are implemented (yet) but we are getting there).

@gustavkarlsson
Copy link

The latest Kotlin plugin now has a Set from -> Predefined Style -> Kotlin style guide option that applies Jetbrains' style guide. Adding another option there would be perfect, but I don't know if there's an API for that...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants