You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "mikemccand (via GitHub)" <gi...@apache.org> on 2023/11/14 14:11:03 UTC

[PR] Remove angry errant lurking semicolons [lucene]

mikemccand opened a new pull request, #12805:
URL: https://github.com/apache/lucene/pull/12805

   I noticed yet another errant `;` and then grep'd and found tons of them and removed them.
   
   Note that it was a bit tricky because some lines that have only whitespace and a semicolon are actually meaningful, e.g.:
   
   ```
     while(something)
         ;
   ```
   
   I translated those cases to:
   
   ```
     while(something) {
     }
   ```
   
   instead.
   
   If a `for` loop definition spans multiple lines, it can have a meaningful semicolon-only line -- there was at least one case of this.
   
   I tried not to touch any auto-gen'd code, which seem to contain many errant semicolons, unfortunately.
   
   I wonder if there is a "useless semicolon" static checker?  Now that I see these things I cannot unsee them!


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

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Remove angry errant lurking semicolons [lucene]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12805:
URL: https://github.com/apache/lucene/pull/12805#discussion_r1392688486


##########
lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java:
##########
@@ -174,7 +174,6 @@ protected SrndQuery getTruncQuery(String truncated) {
     label_1:
     while (true) {
       if (jj_2_1(2)) {
-        ;

Review Comment:
   This is an autogenerated file. If you change it regenerate will revert it.



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

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Remove angry errant lurking semicolons [lucene]

Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12805:
URL: https://github.com/apache/lucene/pull/12805#discussion_r1392697633


##########
lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java:
##########
@@ -174,7 +174,6 @@ protected SrndQuery getTruncQuery(String truncated) {
     label_1:
     while (true) {
       if (jj_2_1(2)) {
-        ;

Review Comment:
   Ah CI already complaied.



##########
lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java:
##########
@@ -174,7 +174,6 @@ protected SrndQuery getTruncQuery(String truncated) {
     label_1:
     while (true) {
       if (jj_2_1(2)) {
-        ;

Review Comment:
   Ah CI already complained.



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

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Remove angry errant lurking semicolons [lucene]

Posted by "mikemccand (via GitHub)" <gi...@apache.org>.
mikemccand merged PR #12805:
URL: https://github.com/apache/lucene/pull/12805


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

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Remove angry errant lurking semicolons [lucene]

Posted by "mikemccand (via GitHub)" <gi...@apache.org>.
mikemccand commented on code in PR #12805:
URL: https://github.com/apache/lucene/pull/12805#discussion_r1392935143


##########
lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java:
##########
@@ -174,7 +174,6 @@ protected SrndQuery getTruncQuery(String truncated) {
     label_1:
     while (true) {
       if (jj_2_1(2)) {
-        ;

Review Comment:
   Woops, I'll fix!



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

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org