You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2020/10/27 08:21:07 UTC

[GitHub] [sling-org-apache-sling-feature-analyser] karlpauls opened a new pull request #26: Rework the analyser to report more context and improve the meta data …

karlpauls opened a new pull request #26:
URL: https://github.com/apache/sling-org-apache-sling-feature-analyser/pull/26


   …caching extension.
   
   * SLING-9823 - Make analyzers report more context about issues and make it possible to filter reports.
   * SLING-9822 - Make artifact retrieval lazy for cached artifacts.
   * SLING-9805 - Add a method to create the metadata cache extension.


----------------------------------------------------------------
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] [sling-org-apache-sling-feature-analyser] cziegeler commented on a change in pull request #26: Rework the analyser to report more context and improve the meta data …

Posted by GitBox <gi...@apache.org>.
cziegeler commented on a change in pull request #26:
URL: https://github.com/apache/sling-org-apache-sling-feature-analyser/pull/26#discussion_r512545425



##########
File path: src/main/java/org/apache/sling/feature/analyser/Analyser.java
##########
@@ -236,29 +244,80 @@ public BundleDescriptor getFrameworkDescriptor() {
 
                 @Override
                 public void reportWarning(final String message) {
-                    warnings.add(message);
+                    if (analyserMetaDataExtension != null && analyserMetaDataExtension.reportWarning(feature.getId())) {

Review comment:
       Why must analyserMetaDataExtension  be available to report anything?




----------------------------------------------------------------
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] [sling-org-apache-sling-feature-analyser] sonarcloud[bot] removed a comment on pull request #26: Rework the analyser to report more context and improve the meta data …

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #26:
URL: https://github.com/apache/sling-org-apache-sling-feature-analyser/pull/26#issuecomment-717072162


   SonarCloud Quality Gate failed.
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&reso
 lved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=CODE_SMELL) [20 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/40.png' alt='42.9%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&metric=new_coverage&view=list) [42.9% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&metric=new_coverage&view=list)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&metric=new_duplicated_lines_density&view=list)
   
   <img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   


----------------------------------------------------------------
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] [sling-org-apache-sling-feature-analyser] sonarcloud[bot] commented on pull request #26: Rework the analyser to report more context and improve the meta data …

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #26:
URL: https://github.com/apache/sling-org-apache-sling-feature-analyser/pull/26#issuecomment-717072162


   SonarCloud Quality Gate failed.
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&reso
 lved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=CODE_SMELL) [20 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/40.png' alt='42.9%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&metric=new_coverage&view=list) [42.9% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&metric=new_coverage&view=list)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&metric=new_duplicated_lines_density&view=list)
   
   <img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   


----------------------------------------------------------------
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] [sling-org-apache-sling-feature-analyser] sonarcloud[bot] commented on pull request #26: Rework the analyser to report more context and improve the meta data …

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #26:
URL: https://github.com/apache/sling-org-apache-sling-feature-analyser/pull/26#issuecomment-717261583


   SonarCloud Quality Gate failed.
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=VULNERABILITY) (and [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&reso
 lved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=SECURITY_HOTSPOT) to review)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=CODE_SMELL) [20 Code Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/40.png' alt='42.9%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&metric=new_coverage&view=list) [42.9% Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&metric=new_coverage&view=list)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-feature-analyser&pullRequest=26&metric=new_duplicated_lines_density&view=list)
   
   <img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/message_warning.png' alt='warning' width='16' height='16' /> The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
   Read more [here](https://sonarcloud.io/documentation/upcoming/)
   
   
   


----------------------------------------------------------------
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] [sling-org-apache-sling-feature-analyser] karlpauls merged pull request #26: Rework the analyser to report more context and improve the meta data …

Posted by GitBox <gi...@apache.org>.
karlpauls merged pull request #26:
URL: https://github.com/apache/sling-org-apache-sling-feature-analyser/pull/26


   


----------------------------------------------------------------
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] [sling-org-apache-sling-feature-analyser] karlpauls commented on a change in pull request #26: Rework the analyser to report more context and improve the meta data …

Posted by GitBox <gi...@apache.org>.
karlpauls commented on a change in pull request #26:
URL: https://github.com/apache/sling-org-apache-sling-feature-analyser/pull/26#discussion_r512711561



##########
File path: src/main/java/org/apache/sling/feature/analyser/Analyser.java
##########
@@ -236,29 +244,80 @@ public BundleDescriptor getFrameworkDescriptor() {
 
                 @Override
                 public void reportWarning(final String message) {
-                    warnings.add(message);
+                    if (analyserMetaDataExtension != null && analyserMetaDataExtension.reportWarning(feature.getId())) {

Review comment:
       @cziegeler, good catch! This was supposed to be the other way around - I fixed 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.

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



[GitHub] [sling-org-apache-sling-feature-analyser] karlpauls commented on pull request #26: Rework the analyser to report more context and improve the meta data …

Posted by GitBox <gi...@apache.org>.
karlpauls commented on pull request #26:
URL: https://github.com/apache/sling-org-apache-sling-feature-analyser/pull/26#issuecomment-717073031


   @cziegeler, this PR tries to improve the caching in the analyser and is combining the 3 issues we had around it. The main idea is that we now have methods to report errors and warnings by extension and by artifact while the old way of just reporting a string now is called global. Furthermore, I made the reporting driven (optionally) by the meta data extension which can now switch it on or off by artifact id and by feature in general. Finally, artifacts are now retrieved more lazily for bundles and for content packages, at least the errors are delayed until they are really needed.
   
   Can you please have a look and let me know if that is going in the right direction?


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