[CODESTYLE] Import order

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

[CODESTYLE] Import order

Nikolay Izhikov-2
Hello, Igniters.

For now, we don’t have checkstyle rule to force import order codestyle [1]
Therefore there is many violations of this rule in current codebase.

Moreover, during review, I saw many not related changes regarding import reorder.

I’ve prepared a PR to fix this [2]

It contains:

a. New checkstyle rule to check import order.
b. Fix of import order violations.

To match Ignite code style import orders you may want to setup Intellij IDEA equal to screenshot [3]

[1] https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines#CodingGuidelines-PackageImporting
[2] https://github.com/apache/ignite/pull/7978
[3] https://yadi.sk/i/kyXSE5rDc3ePOA
Reply | Threaded
Open this post in threaded view
|

Re: [CODESTYLE] Import order

Pavel Tupitsyn
Hello Nikolay,

Can we put those IDEA settings to git, so everyone has them automatically?
I know Rider has this feature for C# code (team-shared settings), surely
IDEA has it too?


On Tue, Jun 30, 2020 at 5:39 PM Nikolay Izhikov <[hidden email]> wrote:

> Hello, Igniters.
>
> For now, we don’t have checkstyle rule to force import order codestyle [1]
> Therefore there is many violations of this rule in current codebase.
>
> Moreover, during review, I saw many not related changes regarding import
> reorder.
>
> I’ve prepared a PR to fix this [2]
>
> It contains:
>
> a. New checkstyle rule to check import order.
> b. Fix of import order violations.
>
> To match Ignite code style import orders you may want to setup Intellij
> IDEA equal to screenshot [3]
>
> [1]
> https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines#CodingGuidelines-PackageImporting
> [2] https://github.com/apache/ignite/pull/7978
> [3] https://yadi.sk/i/kyXSE5rDc3ePOA
Reply | Threaded
Open this post in threaded view
|

Re: [CODESTYLE] Import order

Nikolay Izhikov-2
Hello, Pavel.

> Can we put those IDEA settings to git

Yes we can.
Ignite_codeStyle.xml updated to follow correct import order.

> 30 июня 2020 г., в 18:11, Pavel Tupitsyn <[hidden email]> написал(а):
>
> Hello Nikolay,
>
> Can we put those IDEA settings to git, so everyone has them automatically?
> I know Rider has this feature for C# code (team-shared settings), surely
> IDEA has it too?
>
>
> On Tue, Jun 30, 2020 at 5:39 PM Nikolay Izhikov <[hidden email]> wrote:
>
>> Hello, Igniters.
>>
>> For now, we don’t have checkstyle rule to force import order codestyle [1]
>> Therefore there is many violations of this rule in current codebase.
>>
>> Moreover, during review, I saw many not related changes regarding import
>> reorder.
>>
>> I’ve prepared a PR to fix this [2]
>>
>> It contains:
>>
>> a. New checkstyle rule to check import order.
>> b. Fix of import order violations.
>>
>> To match Ignite code style import orders you may want to setup Intellij
>> IDEA equal to screenshot [3]
>>
>> [1]
>> https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines#CodingGuidelines-PackageImporting
>> [2] https://github.com/apache/ignite/pull/7978
>> [3] https://yadi.sk/i/kyXSE5rDc3ePOA