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
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Currently the Android repo supports multiple formatting styles. Only be looking at the MapView class I can identify 3-4 different ones. If I format code on master using the Intelij hotkey it generates 70 changes. My personal belief is that this shouldn't generate a change at all and that we should aim for a consistent style throughout the repo.
We can customise AndroidStudio be introducing custom styles, code inspections & save macro's.
These can be added to the development setup and guidelines for contributing.
Good catch @tobrun! We've used Checkstyle for this purpose on the Raster SDK in the past and it worked well. It flags style violations as warnings in Android Studio which helps keep everyone honest. The only question is which style we want to use:
We already have checks.xml so we can hook this up in Android Studio to help us develop / enforce styles. JetBrains offers the following plugin to do so. The SDK's build.gradle should already be configured to enforce this.
This is a good thing, but I'd like to see it in one place. Specifically, we have Checkstyle that's part of the Gradle build process already. Ideally we could get Android Studio's Code Style to be driven by that checks.xml file so that we could keep all this information in one spot.
@bleege I have been looking at integrating this in gradle but having no succes,
solution in link above is not working and googling for this only returns checkstyle setup.
Activity
ljbade commentedon Sep 29, 2015
Yeah we could hit this as we make a pass over all the files for JavaDoc
bleege commentedon Sep 29, 2015
Good catch @tobrun! We've used Checkstyle for this purpose on the Raster SDK in the past and it worked well. It flags style violations as warnings in Android Studio which helps keep everyone honest. The only question is which style we want to use:
Let the debate begin! 😄
ljbade commentedon Sep 29, 2015
I'd say most existing code using brackets inline
ljbade commentedon Sep 29, 2015
I'd say most existing code using brackets inline
[-]Setup save actions + formatter for AndroidStudio[/-][+]Android Project Code Style[/+]bleege commentedon Oct 2, 2015
We already have
checks.xmlso we can hook this up in Android Studio to help us develop / enforce styles. JetBrains offers the following plugin to do so. The SDK's build.gradle should already be configured to enforce this.9 remaining items
tobrun commentedon Oct 22, 2015
Ok, finalized it with this codestyle as shown in 83fbdde.
@ljbade @bleege
Could you go over the commit and give feedback on things you like/dislike?
bleege commentedon Oct 22, 2015
This is a good thing, but I'd like to see it in one place. Specifically, we have Checkstyle that's part of the Gradle build process already. Ideally we could get Android Studio's Code Style to be driven by that
checks.xmlfile so that we could keep all this information in one spot.ljbade commentedon Oct 22, 2015
@tobrun Can we keep the existing tab width? it would save a lot of code churn
tobrun commentedon Oct 25, 2015
We can add an codestyle configuration to gradle using
ideaplugin, as shown in this SO-postbleege commentedon Oct 26, 2015
@tobrun Cool. Let's try that then.
tobrun commentedon Oct 28, 2015
@bleege I have been looking at integrating this in
gradlebut having no succes,solution in link above is not working and googling for this only returns checkstyle setup.
tobrun commentedon Nov 25, 2015
Going to close this down for now, will be on the lookout if anything changes in this space