Preprocessing files... warns about file, ignoring the exclusion in the project config

  • ALM used: GitLab
  • CI system used: GitLab CI
  • Scanner command used: SonarScanner CLI 6.1.0.4477
  • Languages of the repository: C++
  • Project: Private SonarCloud project
  • Error observed: Preprocessing warnings on files normally excluded from sources
11:53:29.983 INFO  Organization key: <masked_organization>
11:53:29.984 INFO  Branch name: <masked_branch_name>, type: short-lived
11:53:30.008 INFO  Preprocessing files...
11:53:34.839 WARN  File '/mnt/builds/<masked_project_dir>/a_cache/bin/zstdmt' is ignored. It is a symbolic link targeting a file not located in project basedir.
11:53:34.839 WARN  File '/mnt/builds/<masked_project_dir>/a_cache/bin/unzstd' is ignored. It is a symbolic link targeting a file not located in project basedir.
11:53:34.840 WARN  File '/mnt/builds/<masked_project_dir>/a_cache/bin/zstdcat' is ignored. It is a symbolic link targeting a file not located in project basedir.
11:53:37.930 WARN  File '/mnt/builds/<masked_project_dir>/a_cache/bin/zstdmt' is ignored. It is a symbolic link targeting a file not located in project basedir.
11:53:37.931 WARN  File '/mnt/builds/<masked_project_dir>/a_cache/bin/unzstd' is ignored. It is a symbolic link targeting a file not located in project basedir.
11:53:37.931 WARN  File '/mnt/builds/<masked_project_dir>/a_cache/bin/zstdcat' is ignored. It is a symbolic link targeting a file not located in project basedir.
11:53:38.353 INFO  2 languages detected in 883 preprocessed files
11:53:38.353 INFO  44774 files ignored because of inclusion/exclusion patterns
11:53:38.353 INFO  1129 files ignored because of scm ignore settings
11:53:38.365 INFO  Loading plugins for detected languages
11:53:38.366 INFO  Load/download plugins
11:53:40.050 INFO  Load/download plugins (done) | time=1681ms
11:53:40.105 INFO  Load project repositories
11:53:40.181 INFO  Load project repositories (done) | time=76ms
11:53:40.182 INFO  SCM collecting changed files in the branch
11:53:40.366 INFO  SCM collecting changed files in the branch (done) | time=184ms
11:53:40.370 INFO  Indexing files...
11:53:40.371 INFO  Project configuration:
11:53:40.371 INFO    Included sources: **/src/**/*, **/include/**/*
11:53:40.371 INFO    Excluded sources: **/build-wrapper-dump.json, **/a_cache/**/*, **/test*/**/*, **/unit*/**/*
11:53:40.372 INFO    Included tests: **/test*/**/*, **/unit*/**/*
11:53:40.372 INFO    Excluded tests: **/a_cache/**/*
11:53:40.475 INFO  883 files indexed
  • Steps to reproduce: start the job pipeline
  • Potential workaround: none

Is it possible to disable these WARN?
Or maybe my exclusion filter is bad?

1 Like

Hi @Emmanuel_Delalande

Welcome to the community!
Thanks for sharing this.

Those warnings are emitted in a very early step of the processing, where we list all the files before applying the exclusion patterns. That’s why you see them even if the folder a_cache is excluded.

To check if your exclusion pattern is correct, the easiest way is to browse your project source code in the SonarCloud UI on the main branch, for example, tab Code. You can check that you see all the folders you want to analyze and only them.

This being said, I’ll create an internal ticket to analyze those logs and see if they can be improved.

Hope that helps,
Claire

2 Likes

Thx for your reply