Hello , I’m using sonarcloud with azure pipeline.
I found duplication code detection would not perform on any scss file , it will indicates 0 duplicated lines. But css is one of the analyzed languages, and scss files are recognized in css language ( Administration > General Settings > Languages > CSS)
Example :
src/cssfiles/css3.scss
.ComponentSection {
flex-direction: column;
flex-basis: 100%;
display: flex;
max-width: 64.5%;
height: fit-content;
padding-bottom: 50px;
&__fieldset {
padding:0;
margin:0;
border:none;
}
}
src/cssfiles/test.scss
.ComponentSection {
flex-direction: column;
flex-basis: 100%;
display: flex;
max-width: 64.5%;
height: fit-content;
padding-bottom: 50px;
&__fieldset {
padding:0;
margin:0;
border:none;
}
}
sonar-project.properties
sonar.projectKey=we****
sonar.sources=./src
sonar.sourceEncoding=UTF-8
sonar.tests=./test
sonar.cpd.css.minimumtokens=7
sonar.cpd.css.minimumLines=2
sonar.cpd.js.minimumtokens=7
sonar.cpd.js.minimumLines=2
found on overal code: Duplication : 0 %