AEM | Anyone have the updated version of RTE Color Picker JS ? | Adobe Higher Education
Skip to main content
VeenaVikraman
Community Advisor
Community Advisor
July 4, 2024

AEM | Anyone have the updated version of RTE Color Picker JS ?

  • July 4, 2024
  • 2 respuestas
  • 1475 visualizaciones

Hi team,

 

We've been using the color picker plugin from https://experience-aem.blogspot.com/2017/06/aem-63-touch-ui-rte-rich-text-editor-color-picker-plugin-inplace-dialog-edit.html  on our project. However, our pipeline is failing because the JavaScript for this plugin is being flagged for Code Smell in Sonar. It has a Cognitive Complexity of 149, and Sonar flags anything above 15. Does anyone have a modified version of this color picker plugin that we could use? Any help would be greatly appreciated.

 

Thanks

Veena

Este tema ha sido cerrado para respuestas.

2 respuestas

arunpatidar
Community Advisor
Community Advisor
July 4, 2024

Hi @veenavikraman 
You need to check which function/class showing the complexity in sonar? Can you try to modify code via yourself and try if that works or not.

 

You can get help from ChatGpt 😉

 

Arun Patidar
VeenaVikraman
Community Advisor
Community Advisor
July 4, 2024

It is showing it for the entire file. That is the issue. The complete file needs a refactoring @arunpatidar 

VeenaVikraman
Community Advisor
Community Advisor
July 5, 2024

Hi @veenavikraman 
I was checking the complexity via JShintThe most complex function has a cyclomatic complexity value of 8 while the median is 1.5.

 

how does sonar says 149


@arunpatidar Not sure how it is showing. I missed the screenshot. Will get it once we take and run the piepline to refactor this JS. 

kautuk_sahni
Community Manager
Community Manager
July 8, 2024

@veenavikraman Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you! 

Kautuk Sahni