You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/06/30 14:15:55 UTC
[GitHub] [ignite] nizhikov opened a new pull request #7978: IGNITE-13197: Import order rule added.
nizhikov opened a new pull request #7978:
URL: https://github.com/apache/ignite/pull/7978
PR contains new checkstyle rule to check import order according to Ignite Code Style.
[IntelliJ IDEA setup to match the check](https://yadi.sk/i/kyXSE5rDc3ePOA)
### The Contribution Checklist
- [ ] There is a single JIRA ticket related to the pull request.
- [ ] The web-link to the pull request is attached to the JIRA ticket.
- [ ] The JIRA ticket has the _Patch Available_ state.
- [ ] The pull request body describes changes that have been made.
The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
- [ ] The pull request title is treated as the final commit message.
The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
- [ ] A reviewer has been mentioned through the JIRA comments
(see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers))
- [ ] The pull request has been checked by the Teamcity Bot and
the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
### Notes
- [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
- [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
- [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
- [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] zaleslaw commented on pull request #7978: IGNITE-13197: Import order rule added.
Posted by GitBox <gi...@apache.org>.
zaleslaw commented on pull request #7978:
URL: https://github.com/apache/ignite/pull/7978#issuecomment-651841567
Could we create an XML checkstyle for IDEA or something else to make automatic refactoring?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] nizhikov commented on pull request #7978: IGNITE-13197: Import order rule added.
Posted by GitBox <gi...@apache.org>.
nizhikov commented on pull request #7978:
URL: https://github.com/apache/ignite/pull/7978#issuecomment-651844608
@zaleslaw If you setup IDEA equal to [screenshot](https://yadi.sk/i/kyXSE5rDc3ePOA) then it will automatically rearrange imports according to codestyle(Code -> Optimize imports). All new imports will goes to the right place, also.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] zaleslaw commented on pull request #7978: IGNITE-13197: Import order rule added.
Posted by GitBox <gi...@apache.org>.
zaleslaw commented on pull request #7978:
URL: https://github.com/apache/ignite/pull/7978#issuecomment-651848349
So, I agree, but for newcomers it's a good point to have automatic
checkstyle with all possible rules. I had one a year ago, but it doesn't
cover all cases.
If you have one, please let me know
вт, 30 июн. 2020 г. в 17:51, Nikolay <no...@github.com>:
> @zaleslaw <https://github.com/zaleslaw> If you setup IDEA equal to
> screenshot <https://yadi.sk/i/kyXSE5rDc3ePOA> then it will automatically
> rearrange imports according to codestyle(Code -> Optimize imports). All new
> imports will goes to the right place, also.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/ignite/pull/7978#issuecomment-651844608>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAJEUHNJ7FV5IB45BJM5FWLRZH3XJANCNFSM4OMJAKYQ>
> .
>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] nizhikov merged pull request #7978: IGNITE-13197: Import order rule added.
Posted by GitBox <gi...@apache.org>.
nizhikov merged pull request #7978:
URL: https://github.com/apache/ignite/pull/7978
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] pavlukhin commented on pull request #7978: IGNITE-13197: Import order rule added.
Posted by GitBox <gi...@apache.org>.
pavlukhin commented on pull request #7978:
URL: https://github.com/apache/ignite/pull/7978#issuecomment-651980969
@nizhikov I see that travis build check failed and it seems that it is related to the import order rule (https://travis-ci.org/github/apache/ignite/builds/703548289?utm_source=github_status&utm_medium=notification). Could you please take a look?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] ololo3000 commented on a change in pull request #7978: IGNITE-13197: Import order rule added.
Posted by GitBox <gi...@apache.org>.
ololo3000 commented on a change in pull request #7978:
URL: https://github.com/apache/ignite/pull/7978#discussion_r447981663
##########
File path: modules/direct-io/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/IgniteNativeIoLib.java
##########
@@ -150,10 +150,10 @@ else if (verIntComps.get(verIdx) == 2) {
if (compsCnt > majorRevIdx && verIntComps.get(majorRevIdx) > 4)
return true;
- else if (compsCnt > minorRevIdx
- && verIntComps.get(majorRevIdx) == 4
- && verIntComps.get(minorRevIdx) >= 10)
- return true;
+ else
Review comment:
It seems that braces are required here according to https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines#CodingGuidelines-BracesandIdentation
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] nizhikov commented on pull request #7978: IGNITE-13197: Import order rule added.
Posted by GitBox <gi...@apache.org>.
nizhikov commented on pull request #7978:
URL: https://github.com/apache/ignite/pull/7978#issuecomment-651852109
@zaleslaw We have automation in the form of maven `checkstyle` profile. The goal of this PR is to extend the coverage of automatic checks with the automatic Import Order rule. AFAIK checkstyle+maven is common solution and used in many other open-source projects.
Do you have in mind some other kind of automation?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] zaleslaw commented on pull request #7978: IGNITE-13197: Import order rule added.
Posted by GitBox <gi...@apache.org>.
zaleslaw commented on pull request #7978:
URL: https://github.com/apache/ignite/pull/7978#issuecomment-651854849
No automation, maybe it sounds wrong earlier: I suggest only shared
community checkstyle.xml for using in IDEA (somebody shared one with me a
few year ago, but now I lost it after moving on another laptop)
вт, 30 июн. 2020 г. в 18:03, Nikolay <no...@github.com>:
> @zaleslaw <https://github.com/zaleslaw> We have automation in the form of
> maven checkstyle profile. The goal of this PR is to extend the coverage
> of automatic checks with the automatic Import Order rule. AFAIK
> checkstyle+maven is common solution and used in many other open-source
> projects.
>
> Do you have in mind some other kind of automation?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/ignite/pull/7978#issuecomment-651852109>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAJEUHNA5SIT2MDO5HCHFUTRZH5D5ANCNFSM4OMJAKYQ>
> .
>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org