Code standard

17 views
Skip to first unread message

Johannes Brodwall

unread,
Aug 17, 2016, 3:34:39 PM8/17/16
to SQLDroid
Hi

It seems like some files (e.g. SQLDroidResultSet and SQLDroidResultSet) uses a two-space indent, while other classes (e.g. DroidDataSource and SQLDroidDriver) uses 4 spaces. I propose documenting one standard in the README-file. (Or creating a separate CONTRIBUTE.md documentation with this information). Either standard is fine, but it would be nice with one. Picking 2-spaces means less deviating code, while picking 4-spaces means most idiomatic to Java.


Cheers,
~Johannes

Uwe Kubosch

unread,
Aug 17, 2016, 6:27:41 PM8/17/16
to sqld...@googlegroups.com
Hi!

We should follow the Sun convention of 4 spaces. Stating this in the README or CONTRIBUTING.md is seconded :)

--
Uwe Kubosch
Systems Developer
Datek Wireless AS
u...@datek.no
http://datek.no/
> --
> You received this message because you are subscribed to the Google Groups "SQLDroid" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sqldroid+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Damodar Periwal

unread,
Aug 17, 2016, 7:12:08 PM8/17/16
to sqld...@googlegroups.com
I agree with 4 spaces. Gives better view on the scoping.

Thanks,

-- Damodar

> To unsubscribe from this group and stop receiving emails from it, send an email to sqldroid+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "SQLDroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqldroid+unsubscribe@googlegroups.com.

Jim

unread,
Aug 17, 2016, 7:30:44 PM8/17/16
to sqld...@googlegroups.com
4 is the standard...  Although personally I prefer 2 I'll accept almost anything that doesn't look like '90 C code.

http://www.oracle.com/technetwork/java/codeconventions-150003.pdf
To unsubscribe from this group and stop receiving emails from it, send an email to sqldroid+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Johannes Brodwall

unread,
Aug 20, 2016, 4:41:22 PM8/20/16
to sqld...@googlegroups.com
Sounds like there's a pretty general agreement on 4 spaces, then.

It would be good to have someone clean-up the code at some time, but this will totally mess with the "blame" history. Anyone knows a good workaround for this?

On Thu, Aug 18, 2016 at 1:30 AM Jim <jre...@ergotech.com> wrote:
4 is the standard...  Although personally I prefer 2 I'll accept almost anything that doesn't look like '90 C code.

http://www.oracle.com/technetwork/java/codeconventions-150003.pdf



On 08/17/2016 05:12 PM, Damodar Periwal wrote:
I agree with 4 spaces. Gives better view on the scoping.

Thanks,

-- Damodar
On Wed, Aug 17, 2016 at 3:27 PM, Uwe Kubosch <u...@datek.no> wrote:
Hi!

We should follow the Sun convention of 4 spaces.  Stating this in the README or CONTRIBUTING.md is seconded :)

--
Uwe Kubosch
Systems Developer
Datek Wireless AS
u...@datek.no
http://datek.no/



> On 2016-08-17, at 21:34, Johannes Brodwall <jha...@gmail.com> wrote:
>
> Hi
>
> It seems like some files (e.g. SQLDroidResultSet and SQLDroidResultSet) uses a two-space indent, while other classes (e.g. DroidDataSource and SQLDroidDriver) uses 4 spaces. I propose documenting one standard in the README-file. (Or creating a separate CONTRIBUTE.md documentation with this information). Either standard is fine, but it would be nice with one. Picking 2-spaces means less deviating code, while picking 4-spaces means most idiomatic to Java.
>
>
> Cheers,
> ~Johannes
>
> --
> You received this message because you are subscribed to the Google Groups "SQLDroid" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sqldroid+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "SQLDroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqldroid+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "SQLDroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqldroid+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages