You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/11/22 16:12:09 UTC

[GitHub] [netbeans] KacerCZ opened a new pull request #2555: [NETBEANS-5052] Mark unused private constants

KacerCZ opened a new pull request #2555:
URL: https://github.com/apache/netbeans/pull/2555


   https://issues.apache.org/jira/browse/NETBEANS-5052
   
   Marks unused private constants in PHP Editor in same way as unused private fields and methods.
   
   In following example `BAR3` is marked as unused:
   ![netbeans5052](https://user-images.githubusercontent.com/4249184/99908900-9f7f8700-2ce5-11eb-96c6-6f913deddee4.png)
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] junichi11 commented on a change in pull request #2555: [NETBEANS-5052] Mark unused private constants

Posted by GitBox <gi...@apache.org>.
junichi11 commented on a change in pull request #2555:
URL: https://github.com/apache/netbeans/pull/2555#discussion_r532187798



##########
File path: php/php.editor/src/org/netbeans/modules/php/editor/csl/SemanticAnalysis.java
##########
@@ -727,11 +742,17 @@ public void visit(ConstantDeclaration node) {
                 parentNode = path.get(1);
             }
             if (parentNode instanceof ClassDeclaration || parentNode instanceof InterfaceDeclaration
-                    || parentNode instanceof TraitDeclaration) {
+                    || parentNode instanceof TraitDeclaration || parentNode instanceof ClassInstanceCreation) {
+                boolean isPrivate = Modifier.isPrivate(node.getModifier());
                 List<Identifier> names = node.getNames();
                 if (!names.isEmpty()) {

Review comment:
       Although this is existing code, we can delete this check.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] KacerCZ commented on a change in pull request #2555: [NETBEANS-5052] Mark unused private constants

Posted by GitBox <gi...@apache.org>.
KacerCZ commented on a change in pull request #2555:
URL: https://github.com/apache/netbeans/pull/2555#discussion_r532216008



##########
File path: php/php.editor/src/org/netbeans/modules/php/editor/csl/SemanticAnalysis.java
##########
@@ -727,11 +742,17 @@ public void visit(ConstantDeclaration node) {
                 parentNode = path.get(1);
             }
             if (parentNode instanceof ClassDeclaration || parentNode instanceof InterfaceDeclaration
-                    || parentNode instanceof TraitDeclaration) {
+                    || parentNode instanceof TraitDeclaration || parentNode instanceof ClassInstanceCreation) {
+                boolean isPrivate = Modifier.isPrivate(node.getModifier());
                 List<Identifier> names = node.getNames();
                 if (!names.isEmpty()) {

Review comment:
       Removed.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] junichi11 merged pull request #2555: [NETBEANS-5052] Mark unused private constants

Posted by GitBox <gi...@apache.org>.
junichi11 merged pull request #2555:
URL: https://github.com/apache/netbeans/pull/2555


   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] KacerCZ commented on pull request #2555: [NETBEANS-5052] Mark unused private constants

Posted by GitBox <gi...@apache.org>.
KacerCZ commented on pull request #2555:
URL: https://github.com/apache/netbeans/pull/2555#issuecomment-731845073


   Linux build failed on tests in php.refactoring module because of missing java-cup-11a-runtime.jar.
   I tried to run tests locally and they passed.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] junichi11 commented on a change in pull request #2555: [NETBEANS-5052] Mark unused private constants

Posted by GitBox <gi...@apache.org>.
junichi11 commented on a change in pull request #2555:
URL: https://github.com/apache/netbeans/pull/2555#discussion_r532187582



##########
File path: php/php.editor/src/org/netbeans/modules/php/editor/csl/SemanticAnalysis.java
##########
@@ -727,11 +742,17 @@ public void visit(ConstantDeclaration node) {
                 parentNode = path.get(1);
             }
             if (parentNode instanceof ClassDeclaration || parentNode instanceof InterfaceDeclaration
-                    || parentNode instanceof TraitDeclaration) {
+                    || parentNode instanceof TraitDeclaration || parentNode instanceof ClassInstanceCreation) {

Review comment:
       Maybe, we can delete trait checking because trait can't declare constants. But I suppose it is harmless even as it is.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] tmysik commented on pull request #2555: [NETBEANS-5052] Mark unused private constants

Posted by GitBox <gi...@apache.org>.
tmysik commented on pull request #2555:
URL: https://github.com/apache/netbeans/pull/2555#issuecomment-735383562


   @junichi11 Feel free to merge it once your comments are resolved. Thanks!
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] KacerCZ commented on a change in pull request #2555: [NETBEANS-5052] Mark unused private constants

Posted by GitBox <gi...@apache.org>.
KacerCZ commented on a change in pull request #2555:
URL: https://github.com/apache/netbeans/pull/2555#discussion_r532215947



##########
File path: php/php.editor/src/org/netbeans/modules/php/editor/csl/SemanticAnalysis.java
##########
@@ -727,11 +742,17 @@ public void visit(ConstantDeclaration node) {
                 parentNode = path.get(1);
             }
             if (parentNode instanceof ClassDeclaration || parentNode instanceof InterfaceDeclaration
-                    || parentNode instanceof TraitDeclaration) {
+                    || parentNode instanceof TraitDeclaration || parentNode instanceof ClassInstanceCreation) {

Review comment:
       You are right - removed.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists