AEM-Rules-for-SonarQube
AEM-Rules-for-SonarQube copied to clipboard
Use data-sly-unwrap to Avoid Code Duplication
Remember that you can use data-sly-unwrap. A lot of code can be saved by using it proficiently.
<!--/* Bad */-->
<a href="${model.url} data-sly-test="${model.url}">${model.text}</a>
<sly data-sly-test="${!model.url}">${model.text}</sly>
<!--/* Good */-->
<a href="${model.url} data-sly-unwrap="${!model.url}">${model.text}</a>