how to specify code lines to exclude them from Codacy analysis

2k Views Asked by At

Codacy analysis on git project I had to exclude a few code lines from codacy analysis Ho I can do it? is Codacy has own anotations?(e.g. @SkipLine)

//need crutch for codacy analysis

1

There are 1 best solutions below

0
Bruno_Ferreira On

Currently, codacy do not have annotations to skip lines, but the linters that codacy runs to analyse the code, if they support annotations to ignore lines, you can use it and they will be ignored during the analysis. For example, Codacy runs eslint behind the scenes, so if you wish to ignore some specific pattern in a specific line you can do it like this:

const res = eval('42'); // eslint-disable-line no-eval