SonarEnterprise - For reactjs code, we are getting duplicate & Cognitive complexity

which versions are you using - SonarQube
how is SonarQube deployed: zip
what are you trying to achieve: Regular code scan
what have you tried so far to achieve this: we were using community edition earlier

I need help in two things.

  • while scanning the reactjs components, it’s reporting cognitive complexity which is false as we will have all the code within a function
  • across the react components, we have local state management code, but, it’s reported as duplicate. false poisitive.

Can you help me how to fix this for ReactJS code?

Hey there.

It would be best if you could share some code samples where the results aren’t as expected.

Please also share the version of SOnarQube you’re using, as requested in the template post