SonarCloud has stopped scanning vendor folder after April 30, 2021

We have encountered a weird problem about vendor folder for our javascript repo.

ALM:
Bitbucket

CI:
Bitbucket Cloud

Scanner Command:

          - pipe: sonarsource/sonarcloud-scan:1.2.2
            variables:
              EXTRA_ARGS: |
                -Dsonar.projectVersion=${BITBUCKET_TAG}
                -Dsonar.sources=src
                -Dsonar.exclusions=src/vendor/react/standardRates/dist/**,src/searcher/react/quotes/dist/**,src/libs/**
                -Dsonar.coverage.exclusions=**
                -Dsonar.javascript.globals=addToHomescreen,base_url,bloodhound,bootbox,Chart,CKEDITOR,constants,Dropzone,Enquiry,fbq,ga,ga_code,ga_domain,Globalize,libphonenumber,MarkerClusterer,Mustache,noUiSlider,qq,Subscription,toastr,trace,validateEmail,wNumb,google,React
              SONAR_SCANNER_OPTS: -Xmx1024m

Language:
Javascript

Context:
The vendor folder in any part of our repo directory is not being scanned by sonar. I tried to change the folder name and it has been scanned successfully but the weird thing is, there is no exclusion settings for vendor folder in our yml file and also it is not included on gitignore. I also tried to do it on our other repo but the same thing is happening, sonar is excluding vendor folder. There is also no settings in our sonar account that excludes vendor folder.

We also saw a significant drop of scanned files after April 30, 2021 on the Activity page.

Any help will be appreciated. Thanks

Hello John,

Thank you for your message, and welcome to SonarSource community!

In the context of a JavaScript project, the vendor folder is generally likely to include third-party libraries and assets. Therefore, we recently decided to exclude by default any vendor folders from the analysis. However, if you still want to analyze it, I invite you to read the Default exclusions section of the JavaScript/TypeScript analyser documentation to find out how.

Hope this helps,
Yassin

1 Like

It works. Thank you very much.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.