Exclude javascript file in new code coverage quality gate

Hello,

I’m currently working on a project initially wrote in Javascript. We are currently changing it progressively to typescript. We just integrated sonar and the fact that at least 60% of the new code must be covered.

Old javascript files are not tested. Sometimes, we have to adjust some lines on those files but don’t want to add test on it.

How can we keep the coverage on those files to have the total coverage but don’t be blocked for not respecting the quality gate ?

Is it possible to do the same about complexity, lint or other issues ?

Hey there.

I think you’ll be interested in the documentation on Narrowing the Focus.