You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by Guangdong Liu <li...@gmail.com> on 2023/09/21 11:16:16 UTC

Spotless - code formatting tool

Hi dev,

I want to introduce spotless as a code formatting tool.Spotless has two
very convenient advantages:

1. developers do `mvn spotless:check` command in local and just do the
commit in PR, It will automatically do code formatting. It can't avoid the
review in code when developer not do `mvn spotless:check` command.

2. if in work flow add the check for reformat plugin, it will cause the ci
flow has some modifies need to commit.

Looking forward to community responses.

--

Best Regards

------------

Liugddx
liugddx@gmail.com

Re: Spotless - code formatting tool

Posted by Kaijie Chen <ck...@apache.org>.
+1, SGTM

Kaijie





---- On Thu, 21 Sep 2023 19:16:16 +0800  Guangdong Liu <li...@gmail.com> wrote ----
Hi dev, 
 
I want to introduce spotless as a code formatting tool.Spotless has two 
very convenient advantages: 
 
1. developers do `mvn spotl

Re: Re: Spotless - code formatting tool

Posted by Guangdong Liu <li...@gmail.com>.
I agree with you. I've modified it, using
https://github.com/diffplug/spotless/tree/main/plugin-maven#how-can-i-enforce-formatting-gradually-aka-ratchet


--

Best Regards

------------

Liugddx
liugddx@gmail.com


Mingyu Chen <mo...@163.com> 于2023年10月5日周四 21:25写道:

> Hi Liu:
> This PR is too large and may be conflict with so many other PRs.
> Is there any way to just modify the incremental code, not existing code?
>
>
>
>
> --
>
> Best Regards
> Mingyu Chen
>
> Email:
> morningman@apache.org
>
>
>
>
>
> At 2023-10-01 17:28:53, "Guangdong Liu" <li...@gmail.com> wrote:
> >Hi dev
> >
> >This is my PR, please help the community to review it. If anyone have any
> >questions just let me know and I will follow up. Thanks.
> >
> >https://github.com/apache/doris/pull/25033
> >
> >--
> >
> >Best Regards
> >
> >------------
> >
> >Liugddx
> >liugddx@gmail.com
> >
> >
> >Mingyu Chen <mo...@163.com> 于2023年9月23日周六 21:19写道:
> >
> >> Good idea!
> >>
> >>
> >>
> >>
> >> --
> >>
> >> Best Regards
> >> Mingyu Chen
> >>
> >> Email:
> >> morningman@apache.org
> >>
> >>
> >>
> >>
> >>
> >> At 2023-09-21 19:16:16, "Guangdong Liu" <li...@gmail.com> wrote:
> >> >Hi dev,
> >> >
> >> >I want to introduce spotless as a code formatting tool.Spotless has two
> >> >very convenient advantages:
> >> >
> >> >1. developers do `mvn spotless:check` command in local and just do the
> >> >commit in PR, It will automatically do code formatting. It can't avoid
> the
> >> >review in code when developer not do `mvn spotless:check` command.
> >> >
> >> >2. if in work flow add the check for reformat plugin, it will cause
> the ci
> >> >flow has some modifies need to commit.
> >> >
> >> >Looking forward to community responses.
> >> >
> >> >--
> >> >
> >> >Best Regards
> >> >
> >> >------------
> >> >
> >> >Liugddx
> >> >liugddx@gmail.com
> >>
>

Re:Re: Spotless - code formatting tool

Posted by Mingyu Chen <mo...@163.com>.
Hi Liu:
This PR is too large and may be conflict with so many other PRs.
Is there any way to just modify the incremental code, not existing code?




--

Best Regards
Mingyu Chen

Email:
morningman@apache.org





At 2023-10-01 17:28:53, "Guangdong Liu" <li...@gmail.com> wrote:
>Hi dev
>
>This is my PR, please help the community to review it. If anyone have any
>questions just let me know and I will follow up. Thanks.
>
>https://github.com/apache/doris/pull/25033
>
>--
>
>Best Regards
>
>------------
>
>Liugddx
>liugddx@gmail.com
>
>
>Mingyu Chen <mo...@163.com> 于2023年9月23日周六 21:19写道:
>
>> Good idea!
>>
>>
>>
>>
>> --
>>
>> Best Regards
>> Mingyu Chen
>>
>> Email:
>> morningman@apache.org
>>
>>
>>
>>
>>
>> At 2023-09-21 19:16:16, "Guangdong Liu" <li...@gmail.com> wrote:
>> >Hi dev,
>> >
>> >I want to introduce spotless as a code formatting tool.Spotless has two
>> >very convenient advantages:
>> >
>> >1. developers do `mvn spotless:check` command in local and just do the
>> >commit in PR, It will automatically do code formatting. It can't avoid the
>> >review in code when developer not do `mvn spotless:check` command.
>> >
>> >2. if in work flow add the check for reformat plugin, it will cause the ci
>> >flow has some modifies need to commit.
>> >
>> >Looking forward to community responses.
>> >
>> >--
>> >
>> >Best Regards
>> >
>> >------------
>> >
>> >Liugddx
>> >liugddx@gmail.com
>>

Re: Spotless - code formatting tool

Posted by Guangdong Liu <li...@gmail.com>.
Hi dev

This is my PR, please help the community to review it. If anyone have any
questions just let me know and I will follow up. Thanks.

https://github.com/apache/doris/pull/25033

--

Best Regards

------------

Liugddx
liugddx@gmail.com


Mingyu Chen <mo...@163.com> 于2023年9月23日周六 21:19写道:

> Good idea!
>
>
>
>
> --
>
> Best Regards
> Mingyu Chen
>
> Email:
> morningman@apache.org
>
>
>
>
>
> At 2023-09-21 19:16:16, "Guangdong Liu" <li...@gmail.com> wrote:
> >Hi dev,
> >
> >I want to introduce spotless as a code formatting tool.Spotless has two
> >very convenient advantages:
> >
> >1. developers do `mvn spotless:check` command in local and just do the
> >commit in PR, It will automatically do code formatting. It can't avoid the
> >review in code when developer not do `mvn spotless:check` command.
> >
> >2. if in work flow add the check for reformat plugin, it will cause the ci
> >flow has some modifies need to commit.
> >
> >Looking forward to community responses.
> >
> >--
> >
> >Best Regards
> >
> >------------
> >
> >Liugddx
> >liugddx@gmail.com
>

Re:Spotless - code formatting tool

Posted by Mingyu Chen <mo...@163.com>.
Good idea!




--

Best Regards
Mingyu Chen

Email:
morningman@apache.org





At 2023-09-21 19:16:16, "Guangdong Liu" <li...@gmail.com> wrote:
>Hi dev,
>
>I want to introduce spotless as a code formatting tool.Spotless has two
>very convenient advantages:
>
>1. developers do `mvn spotless:check` command in local and just do the
>commit in PR, It will automatically do code formatting. It can't avoid the
>review in code when developer not do `mvn spotless:check` command.
>
>2. if in work flow add the check for reformat plugin, it will cause the ci
>flow has some modifies need to commit.
>
>Looking forward to community responses.
>
>--
>
>Best Regards
>
>------------
>
>Liugddx
>liugddx@gmail.com