You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by 陈明雨 <mo...@163.com> on 2021/11/16 16:38:05 UTC

Add Clang format action

Hi all:


I made a pull request[1] to add clang format action[2].


This action will check the BE code format when a new PR is submitted.
In the follow-up, I will format the BE code once, and then the new PR needs to
ensure that the clang format check is passed before it can be merged into trunk.


[1] https://github.com/apache/incubator-doris/pull/7132
[2] https://github.com/DoozyX/clang-format-lint-action



--

此致!Best Regards
陈明雨 Mingyu Chen

Email:
chenmingyu@apache.org

Re:Re: Re: Add Clang format action

Posted by 陈明雨 <mo...@163.com>.
>For the Java code format in IDE, you can take an example of
>servicecomb-java-chassis here[1]
>We can do some customization on the Google Java code format.
>
>[1]https://github.com/apache/servicecomb-java-chassis/tree/master/etc

Thanks a lot, I will take a deep dive into it




--

此致!Best Regards
陈明雨 Mingyu Chen

Email:
chenmingyu@apache.org





在 2021-11-18 08:08:44,"Willem Jiang" <wi...@gmail.com> 写道:
>For the Java code format in IDE, you can take an example of
>servicecomb-java-chassis here[1]
>We can do some customization on the Google Java code format.
>
>[1]https://github.com/apache/servicecomb-java-chassis/tree/master/etc
>
>Willem Jiang
>
>Twitter: willemjiang
>Weibo: 姜宁willem
>
>On Wed, Nov 17, 2021 at 11:13 PM 陈明雨 <mo...@163.com> wrote:
>>
>> >If we use IDE, will the code be formatted  automatically?Yes, there are plug-ins for various IDE, you can refer to [1].But currently, I coun't find a proper way to format the Java code. The Google java code format[2]can not be customized. And its default behavior is slightly different from our current code style.
>>
>> [1] http://doris.incubator.apache.org/master/zh-CN/developer-guide/be-vscode-dev.html#%E5%89%8D%E6%9C%9F%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C
>> [2] https://github.com/google/google-java-format
>>
>>
>>
>> --
>>
>> 此致!Best Regards
>> 陈明雨 Mingyu Chen
>>
>> Email:
>> chenmingyu@apache.org
>>
>>
>>
>>
>>
>> 在 2021-11-17 12:22:45,"ling miao" <li...@apache.org> 写道:
>> >If we use IDE, will the code be formatted  automatically?
>> >
>> >Ling Miao
>> >
>> >陈明雨 <mo...@163.com> 于2021年11月17日周三 上午12:38写道:
>> >
>> >> Hi all:
>> >>
>> >>
>> >> I made a pull request[1] to add clang format action[2].
>> >>
>> >>
>> >> This action will check the BE code format when a new PR is submitted.
>> >> In the follow-up, I will format the BE code once, and then the new PR
>> >> needs to
>> >> ensure that the clang format check is passed before it can be merged into
>> >> trunk.
>> >>
>> >>
>> >> [1] https://github.com/apache/incubator-doris/pull/7132
>> >> [2] https://github.com/DoozyX/clang-format-lint-action
>> >>
>> >>
>> >>
>> >> --
>> >>
>> >> 此致!Best Regards
>> >> 陈明雨 Mingyu Chen
>> >>
>> >> Email:
>> >> chenmingyu@apache.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
>For additional commands, e-mail: dev-help@doris.apache.org

Re: Re: Add Clang format action

Posted by Willem Jiang <wi...@gmail.com>.
For the Java code format in IDE, you can take an example of
servicecomb-java-chassis here[1]
We can do some customization on the Google Java code format.

[1]https://github.com/apache/servicecomb-java-chassis/tree/master/etc

Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Nov 17, 2021 at 11:13 PM 陈明雨 <mo...@163.com> wrote:
>
> >If we use IDE, will the code be formatted  automatically?Yes, there are plug-ins for various IDE, you can refer to [1].But currently, I coun't find a proper way to format the Java code. The Google java code format[2]can not be customized. And its default behavior is slightly different from our current code style.
>
> [1] http://doris.incubator.apache.org/master/zh-CN/developer-guide/be-vscode-dev.html#%E5%89%8D%E6%9C%9F%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C
> [2] https://github.com/google/google-java-format
>
>
>
> --
>
> 此致!Best Regards
> 陈明雨 Mingyu Chen
>
> Email:
> chenmingyu@apache.org
>
>
>
>
>
> 在 2021-11-17 12:22:45,"ling miao" <li...@apache.org> 写道:
> >If we use IDE, will the code be formatted  automatically?
> >
> >Ling Miao
> >
> >陈明雨 <mo...@163.com> 于2021年11月17日周三 上午12:38写道:
> >
> >> Hi all:
> >>
> >>
> >> I made a pull request[1] to add clang format action[2].
> >>
> >>
> >> This action will check the BE code format when a new PR is submitted.
> >> In the follow-up, I will format the BE code once, and then the new PR
> >> needs to
> >> ensure that the clang format check is passed before it can be merged into
> >> trunk.
> >>
> >>
> >> [1] https://github.com/apache/incubator-doris/pull/7132
> >> [2] https://github.com/DoozyX/clang-format-lint-action
> >>
> >>
> >>
> >> --
> >>
> >> 此致!Best Regards
> >> 陈明雨 Mingyu Chen
> >>
> >> Email:
> >> chenmingyu@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org


Re:Re: Add Clang format action

Posted by 陈明雨 <mo...@163.com>.
>If we use IDE, will the code be formatted  automatically?Yes, there are plug-ins for various IDE, you can refer to [1].But currently, I coun't find a proper way to format the Java code. The Google java code format[2]can not be customized. And its default behavior is slightly different from our current code style.

[1] http://doris.incubator.apache.org/master/zh-CN/developer-guide/be-vscode-dev.html#%E5%89%8D%E6%9C%9F%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C
[2] https://github.com/google/google-java-format



--

此致!Best Regards
陈明雨 Mingyu Chen

Email:
chenmingyu@apache.org





在 2021-11-17 12:22:45,"ling miao" <li...@apache.org> 写道:
>If we use IDE, will the code be formatted  automatically?
>
>Ling Miao
>
>陈明雨 <mo...@163.com> 于2021年11月17日周三 上午12:38写道:
>
>> Hi all:
>>
>>
>> I made a pull request[1] to add clang format action[2].
>>
>>
>> This action will check the BE code format when a new PR is submitted.
>> In the follow-up, I will format the BE code once, and then the new PR
>> needs to
>> ensure that the clang format check is passed before it can be merged into
>> trunk.
>>
>>
>> [1] https://github.com/apache/incubator-doris/pull/7132
>> [2] https://github.com/DoozyX/clang-format-lint-action
>>
>>
>>
>> --
>>
>> 此致!Best Regards
>> 陈明雨 Mingyu Chen
>>
>> Email:
>> chenmingyu@apache.org

Re: Add Clang format action

Posted by ling miao <li...@apache.org>.
If we use IDE, will the code be formatted  automatically?

Ling Miao

陈明雨 <mo...@163.com> 于2021年11月17日周三 上午12:38写道:

> Hi all:
>
>
> I made a pull request[1] to add clang format action[2].
>
>
> This action will check the BE code format when a new PR is submitted.
> In the follow-up, I will format the BE code once, and then the new PR
> needs to
> ensure that the clang format check is passed before it can be merged into
> trunk.
>
>
> [1] https://github.com/apache/incubator-doris/pull/7132
> [2] https://github.com/DoozyX/clang-format-lint-action
>
>
>
> --
>
> 此致!Best Regards
> 陈明雨 Mingyu Chen
>
> Email:
> chenmingyu@apache.org