Sonarcloud didn't detect magic number in Javascript code

Hi, I’m using Sonarcloud with Azure DevOps. The analysis is done, but there is a piece of code that actually made me install Sonarcloud:
if (count === 10) {
And I was sure this will be detected as a code smell, and it should be because of the " Magic numbers should not be used" rule.

But sonarcloud didn’t mark it as a code smell. Any idea why?

Hey there.

This rule is not active in the default Sonar Way Quality Profile for Javascript. Have you created a profile where the rule is turned on and made sure it’s assigned to the project in question?

That was the problem. Thank you

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.