Cloud manager | Community
Skip to main content
February 19, 2021
Solved

Cloud manager

  • February 19, 2021
  • 1 reply
  • 1607 views

We recently start using cloud manager for our project but with the latest version has been removed the sonar properties in order to avoid build and quality scanning failures. There where any alternative to add class exclusion from code coverage ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by davidjgonzalezzzz

I assume by "sonar properties" you mean setting blanket exclusions at the POM level?

 

It's typically unwise to blanket exclude entire packages/classes from code quality checks.

 

What you should  do is:

1. Review violations reported by Cloud Manager, and fix the ones you can

1. There may be reported issues that aren't for whatever reason you do not want to/cannot change, for these, it is better to explicitly suppress that exact warning for just that method/class similar to [1]. This way if you evolve that code, and introduce a violation you should correct, Cloud Manager can alert you about it - if you completely exclude packages/classes for being scanned, this is a good way to result in an unstable/vulnerable app.

 

Also, FWIW - in my experience the "estimated time to resolve" issues in the Cloud Manager violation repo is exceedingly generous. It usually takes me a maybe .. 1/10th of the estimated time to resolve most issues - so don't let that # scare you off from improving your code base.

 

[1] https://github.com/Adobe-Marketing-Cloud/asset-share-commons/blob/bc16654589301bd2990302a82c701558b5edee07/core/src/main/java/com/adobe/aem/commons/assetshare/content/properties/impl/ComputedPropertiesImpl.java#L71

1 reply

davidjgonzalezzzzAdobe EmployeeAccepted solution
Adobe Employee
February 19, 2021

I assume by "sonar properties" you mean setting blanket exclusions at the POM level?

 

It's typically unwise to blanket exclude entire packages/classes from code quality checks.

 

What you should  do is:

1. Review violations reported by Cloud Manager, and fix the ones you can

1. There may be reported issues that aren't for whatever reason you do not want to/cannot change, for these, it is better to explicitly suppress that exact warning for just that method/class similar to [1]. This way if you evolve that code, and introduce a violation you should correct, Cloud Manager can alert you about it - if you completely exclude packages/classes for being scanned, this is a good way to result in an unstable/vulnerable app.

 

Also, FWIW - in my experience the "estimated time to resolve" issues in the Cloud Manager violation repo is exceedingly generous. It usually takes me a maybe .. 1/10th of the estimated time to resolve most issues - so don't let that # scare you off from improving your code base.

 

[1] https://github.com/Adobe-Marketing-Cloud/asset-share-commons/blob/bc16654589301bd2990302a82c701558b5edee07/core/src/main/java/com/adobe/aem/commons/assetshare/content/properties/impl/ComputedPropertiesImpl.java#L71