-
Notifications
You must be signed in to change notification settings - Fork 120
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
Enforce code quality standards #111
Comments
The basic infrastructure is now in place, just use However:
Reopening to discuss these. |
Discovered this awesome IDEA plugin which will give you warnings right inline with the code, example: it's pretty configurable too. Still looking into all the rules in |
I've made my way through the massive amounts of documentation checkstyle has and figured out how to add a custom check (in PR #123). Now I'm going through and cleaning up the obvious warnings checkstyle has within the testapp. If it's something i'm not sure we should fix, i'll leave it for discussion and possible removal of that rule. |
PR #124 includes most of the checkstyle warning fixes within the testapp only. My thoughts so far:
|
Style From Mapbox Android Legacy: https://github.com/mapbox/ma-sdk-legacy/blob/mb-pages/checks.xml |
Square Style From Retrofit: https://github.com/square/retrofit/blob/master/checkstyle.xml |
@mapbox/android As discussed, we're gonna with https://github.com/square/java-code-styles. I'll install and document this and ping you all when ready. |
After setting up java-code-styles, I attempted to get sqaures checkstyle.xml file up and running in Android Studio and it was outputing quite a few errors. Did a little research and after reading this ticket, it looks like squares using Google java format instead with explicitly says:
Waiting on this till Monday when we can discuss this more internally. |
@cammace As discussed today, let's continue with researching https://github.com/google/google-java-format/ instead and, if it looks good, let's just adopt it. |
Looking more into this, I setup Moving forward, I think the best route will be to continue with using the current Google checkstyle in this repo and customizing it where we see fit over the next few weeks. Next steps will be cleaning up the code so all warnings, errors are relieved and then integrating into Bitrise. |
The main SDK is thinking of enforcing code quality standards in mapbox/mapbox-gl-native#4299. We should tag along for consistency.
The text was updated successfully, but these errors were encountered: