You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There were some internal discussions regarding code style and current configurations in this repository (paqN3M-OJ-p2) and there was an overall feeling that we should focus on using the official Kotlincode style as close as possible and maybe stop committing IDE-specific code style configs to Git, as files such as .idea/codeStyles/Project.xml.
That file frequently has its content updated because of IDE changes but is rarely updated. Besides that, having that file in the repo also makes us use outdated conventions. Another option, if we decide to keep the codeStyles files would be to make sure we maintain those code styles configs up-to-date.
The initial plan is to get this repo closer to what WooCommerce has in terms of code-styling, which allows us to always use Android Studio official updated conventions, and avoid conflicts in IDE config files.
Tasks:
Update .editorconfig to keep some required settings (if needed)
Remove Kotlin code-style settings from .idea/codeStyles/Project.xml or set it to the official defaults (KOTLIN_OFFICIAL code style defaults option in Project.xml)
Reformat ALL Kotlin files in the project according to the up-to-date official code style in IDE
Update coding-style.md with some instructions for manual IDE configurations (if needed)
Ideally, we would also completely remove the Project.xml file and migrate some configs to .editorconfig for other languages (XML and Java) BUT I was playing with that for a bit and that will introduce quite some different formatting (or just inflate the .editorconfig file with IntelliJ specific rules) so it's something to be discussed a bit more.
The text was updated successfully, but these errors were encountered:
I updated the issue description to focus on Kotlin and not the removal of codeStyle folder, as that would also affect Java and XML code style configurations and this was not discussed with the internal team yet.
It doesn't seem like Java and XML configs in Android Studio have a clear default like the KOTLIN_OFFICIAL option for Kotlin so it is a bit trickier to completely ignore the Project.xml configs as different people might have that configured completely differently.
thomashorta
changed the title
Use official Kotlin code style and remove IDE code-style settings
Use official Kotlin code style conventions
Dec 28, 2022
There were some internal discussions regarding code style and current configurations in this repository (paqN3M-OJ-p2) and there was an overall feeling that we should focus on using the official Kotlin code style as close as possible and maybe stop committing IDE-specific code style configs to Git, as files such as
.idea/codeStyles/Project.xml
.That file frequently has its content updated because of IDE changes but is rarely updated. Besides that, having that file in the repo also makes us use outdated conventions. Another option, if we decide to keep the
codeStyles
files would be to make sure we maintain those code styles configs up-to-date.The initial plan is to get this repo closer to what WooCommerce has in terms of code-styling, which allows us to always use Android Studio official updated conventions, and avoid conflicts in IDE config files.
Tasks:
.editorconfig
to keep some required settings (if needed).idea/codeStyles/Project.xml
or set it to the official defaults (KOTLIN_OFFICIAL
code style defaults option inProject.xml
)coding-style.md
with some instructions for manual IDE configurations (if needed)Ideally, we would also completely remove the
Project.xml
file and migrate some configs to.editorconfig
for other languages (XML
andJava
) BUT I was playing with that for a bit and that will introduce quite some different formatting (or just inflate the.editorconfig
file with IntelliJ specific rules) so it's something to be discussed a bit more.The text was updated successfully, but these errors were encountered: