Incorrect duplicate code block in javascript file

  • ALM used:
  • CI system used:
    GitHub Actions
  • Scanner command used (monorepo):
    mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
  • Languages of the repository:
    Java & JavaScript/TypeScript/HTML

I recently added a new module to my monorepo to scan my lambda functions and it is incorrectly citing a duplicate block in one of my files, where there is no duplicate. It is a switch statement with different cases which isn’t used anywhere else in my repo. Is there a way to ‘fix’ this? The weird thing is it says it is duplicated by the same block that it is referring to?

Hey there.

Can you provide a screenshot or code sample?

This is the only code like this in the whole repo.

Hey there.

Checkout this post: