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 2021/05/18 08:53:02 UTC

[GitHub] [ignite] nizhikov opened a new pull request #9106: IGNITE-14714 LineLength checkstyle rule added

nizhikov opened a new pull request #9106:
URL: https://github.com/apache/ignite/pull/9106


   This PR adds `LineLength` rule to check style and fixes violations in the current codebase.
   
   ### 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] ololo3000 edited a comment on pull request #9106: IGNITE-14714 LineLength checkstyle rule added

Posted by GitBox <gi...@apache.org>.
ololo3000 edited a comment on pull request #9106:
URL: https://github.com/apache/ignite/pull/9106#issuecomment-844052531


   I propose to add `<option name="RIGHT_MARGIN" value="140"/>` to ignite/idea/ignite_codeStyle.xml. The default is 120. 
   WDYT?


-- 
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 #9106: IGNITE-14714 LineLength checkstyle rule added

Posted by GitBox <gi...@apache.org>.
nizhikov merged pull request #9106:
URL: https://github.com/apache/ignite/pull/9106


   


-- 
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 #9106: IGNITE-14714 LineLength checkstyle rule added

Posted by GitBox <gi...@apache.org>.
nizhikov commented on pull request #9106:
URL: https://github.com/apache/ignite/pull/9106#issuecomment-844064722


   @ololo3000 Good cactch. Thanks. I've added this to the configuration.


-- 
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 pull request #9106: IGNITE-14714 LineLength checkstyle rule added

Posted by GitBox <gi...@apache.org>.
ololo3000 commented on pull request #9106:
URL: https://github.com/apache/ignite/pull/9106#issuecomment-844052531


   I propose to add <option name="RIGHT_MARGIN" value="140"/> to ignite/idea/ignite_codeStyle.xml. The default is 120. 
   WDYT?


-- 
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 a change in pull request #9106: IGNITE-14714 LineLength checkstyle rule added

Posted by GitBox <gi...@apache.org>.
nizhikov commented on a change in pull request #9106:
URL: https://github.com/apache/ignite/pull/9106#discussion_r635259625



##########
File path: modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/internal/ConnectionClientPool.java
##########
@@ -670,8 +679,11 @@ public boolean removeNodeClient(UUID nodeId, GridCommunicationClient rmvClient)
         for (; ; ) {
             GridCommunicationClient[] curClients = clients.get(nodeId);
 
-            if (curClients == null || rmvClient.connectionIndex() >= curClients.length || curClients[rmvClient.connectionIndex()] != rmvClient)
+            if (curClients == null
+                || rmvClient.connectionIndex() >= curClients.length
+                || curClients[rmvClient.connectionIndex()] != rmvClient) {

Review comment:
       Fixed




-- 
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 #9106: IGNITE-14714 LineLength checkstyle rule added

Posted by GitBox <gi...@apache.org>.
ololo3000 commented on a change in pull request #9106:
URL: https://github.com/apache/ignite/pull/9106#discussion_r635248974



##########
File path: modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/internal/ConnectionClientPool.java
##########
@@ -670,8 +679,11 @@ public boolean removeNodeClient(UUID nodeId, GridCommunicationClient rmvClient)
         for (; ; ) {
             GridCommunicationClient[] curClients = clients.get(nodeId);
 
-            if (curClients == null || rmvClient.connectionIndex() >= curClients.length || curClients[rmvClient.connectionIndex()] != rmvClient)
+            if (curClients == null
+                || rmvClient.connectionIndex() >= curClients.length
+                || curClients[rmvClient.connectionIndex()] != rmvClient) {

Review comment:
       The next statement is one-liner. We don't need braces here.




-- 
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