Java Code Style

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Java Code Style

Pis Kevin

Hi,

 

I use google java code style in intellj idea. But when I reformat the following codes, its  inconsistent with the code in spark.

 

Before reformat:

 

After reformat:

 

 

Why? And how to fix the issue.

Reply | Threaded
Open this post in threaded view
|

Re: Java Code Style

Sean Owen-2
Do you just mean you want to adjust the code style rules? Yes you can do that in IJ, just a matter of finding the indent rule to adjust.
The Spark style is pretty normal stuff, though not 100% consistent.I prefer the first style in this case. Sometimes it's a matter of judgment when to differ from a standard style for better readability.

On Sat, Feb 20, 2021 at 8:53 AM Pis Kevin <[hidden email]> wrote:

Hi,

 

I use google java code style in intellj idea. But when I reformat the following codes, its  inconsistent with the code in spark.

 

Before reformat:

 

After reformat:

 

 

Why? And how to fix the issue.

Reply | Threaded
Open this post in threaded view
|

Re: Java Code Style

Pis Kevin
Ok, thanks. 

Sean Owen <[hidden email]> 于2021年2月21日周日 上午12:33写道:
Do you just mean you want to adjust the code style rules? Yes you can do that in IJ, just a matter of finding the indent rule to adjust.
The Spark style is pretty normal stuff, though not 100% consistent.I prefer the first style in this case. Sometimes it's a matter of judgment when to differ from a standard style for better readability.

On Sat, Feb 20, 2021 at 8:53 AM Pis Kevin <[hidden email]> wrote:

Hi,

 

I use google java code style in intellj idea. But when I reformat the following codes, its  inconsistent with the code in spark.

 

Before reformat:

 

After reformat:

 

 

Why? And how to fix the issue.



--

Best,

Kevin Pis