java-code-styles icon indicating copy to clipboard operation
java-code-styles copied to clipboard

Checkstyle rules for Square's code style?

Open a11n opened this issue 9 years ago β€’ 11 comments

I like your code style. However, when reformatting my code using your style I am encountering various checkstyle violations for either Sun's or Google's default rules. It mostly complains about whitespaces before/after curly braces, line length and such stuff.

So my question is, if there exists a particular checkstyle-rules.xml for this style? Maybe it's a good idea to have both in place, code style along with dedicated check.

I've looked into the ones you are using in your projects, for instance Dagger, but actually it just omits some rules.

Thanks in advance.

a11n avatar Mar 11 '15 15:03 a11n

We don't have a standard one, no. I'd be open to creating one, but a little birdie told me of a tool which is coming out which might obviate the need for it.

JakeWharton avatar Mar 14 '15 06:03 JakeWharton

Thanks so far for the information. Which tool are you referring to? :-) Any aprox. release date?

a11n avatar Mar 16 '15 11:03 a11n

I'm cleaning up an app at the moment and am also interested in a checkstyles implementation or this avian affiliated tool. Is any more information available? Thanks!

dkozel avatar May 01 '15 13:05 dkozel

@JakeWharton Any new on the tool you mention before? I'm seen exactly that neither Square or you have a standard checkstyle, and what is more noticeable, newest project like RxAndroid doesn't have any...

cristiangarciascmspain avatar Nov 16 '15 18:11 cristiangarciascmspain

RxAndroid is not our project.

JakeWharton avatar Nov 16 '15 19:11 JakeWharton

A dream would become reality if after such a long time a tool comes out which automates checkstyle synchronization between build tool and IDE. @JakeWharton I hope you are note joking.

johnjohndoe avatar Nov 16 '15 23:11 johnjohndoe

sorry, my mistake I was thinking on RxBinding.

but, anyway, any news about the tool?

cristiangarciascmspain avatar Nov 17 '15 10:11 cristiangarciascmspain

https://github.com/google/google-java-format/

On Tue, Nov 17, 2015 at 5:38 AM Cristian Garcia MarΓ­n < [email protected]> wrote:

sorry, my mistake I was thinking on RxBinding.

but, anyway, any news about the tool?

β€” Reply to this email directly or view it on GitHub https://github.com/square/java-code-styles/issues/9#issuecomment-157332172 .

JakeWharton avatar Nov 17 '15 15:11 JakeWharton

Hey, I am trying to find exactly checkstyle.xml for this style, SquareAndroid. If there exists a checkstyle.xml now, could you shared with me, please ?

Thank you

secilgenc avatar May 18 '17 07:05 secilgenc

@JakeWharton

[...] but a little birdie told me of a tool which is coming out which might obviate the need for it.

Any update on this? It's 2 years since that little bird told you a hint πŸ˜„ 🐦

janheinrichmerker avatar Jun 04 '17 23:06 janheinrichmerker

It was google's java formatter.

On Sun, Jun 4, 2017 at 7:20 PM Heinrich Reimer [email protected] wrote:

@JakeWharton https://github.com/jakewharton

[...] but a little birdie told me of a tool which is coming out which might obviate the need for it.

Any update on this? It's 2 years since that little bird told you a hint πŸ˜„ 🐦

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/square/java-code-styles/issues/9#issuecomment-306074170, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEEbCnSL9F4nf6VfZFnBOjO1sZY_DHks5sAzuxgaJpZM4DtCl6 .

JakeWharton avatar Jun 05 '17 00:06 JakeWharton