In most *.vue
files we have translations living within an <i18n>
tag. Is there a way to exclude those from analysis? Especially from coverage reports.
Hi,
Could you specify which language(s) you want to ignore those tags? Even better, which rules?
Thx,
Ann
Hi @ganncamp, thanks for reaching out! Not sure exactly what you mean by languages, but we use Vue3. At the bottom of .vue
files we normally have translations like this:
<i18n locale="en">
...
</i18n>
<i18n locale="de">
...
</i18n>
In some cases Sonarcloud complains about missing conditions on coverage. As we honestly don’t care about coverage in translations, we thought an easy way of opting out of this is to simply ignore those <i18n>
tags from analysis completely.
Does this help? Let me know if you need more info
Hi,
Sorry, I overlooked this part yesterday:
For coverage, we go strictly by what your coverage reports say.
You could set a coverage exclusion on the entire file, but not just on tags.
Ann