common-ts:DuplicatedBlocks should ignore imports

  • versions used: TypeScript analyzer on SonarCloud (as of July 1, 2020)
  • minimal code sample to reproduce - the following line in more than one file:
import { Component, OnDestroy, OnInit } from '@angular/core';

Hello @xemlock,

The duplicated block this issue refers to can be identified thanks to a grey bar at the left (next to coverage). The issue is reported at the top of the file, but the duplicated block can be anywhere.

Knowing that, is it really the import the problem? I’m asking because copying the line you provided in multiple files should not be enough to trigger duplication.