Problems with SCM exclusions when running SonarScanner for MSBuild with Docker

Details/Info

  • ALM used: GitHub
  • CI system used: Jenkins
  • Scanner command used when applicable
SonarScanner.MSBuild.exe begin
  -k:$key
  -o:$org 
  -v:"$ver" 
  -d:sonar.host.url=$sonarUrl 
  -d:sonar.login=$sonarAPIKey
  -d:sonar.cs.dotcover.reportsPaths="$dotCoverHTMLPath" 
  -d:sonar.cs.nunit.reportsPaths="$NUnitXMLPath" 
  -d:sonar.sourceEncoding="UTF-8"
  • Languages of the repository: C#

Errors observed

Results show up as “the main branch of this repository has no lines of code” on SonarCloud, whereas the same command ran locally works fine.

Looking into the logs, I found this:

INFO: 11150 files ignored because of scm ignore settings

Then, running it with -X, I found this:

16:00:06.275 DEBUG: 0 non excluded files in this Git repository

Comparing with running it locally, I also found some strange Git-related lines that weren’t on the local logs:

16:00:06.071 DEBUG: Thread[ForkJoinPool.commonPool-worker-3,5,main]: start measure timestamp resolution (C:) in C:\build\.git
16:00:06.083 DEBUG: Thread[ForkJoinPool.commonPool-worker-3,5,main]: end measure timestamp resolution (C:) in C:\build\.git
16:00:06.083 DEBUG: Thread[ForkJoinPool.commonPool-worker-3,5,main]: start measure minimal racy interval in C:\build\.git
16:00:06.088 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.085234100, lastModified=2020-07-06 16:00:06.085234100, size=1, fileKey=java.lang.Object@b34832b
16:00:06.089 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.085234100 to 2020-07-06 16:00:06.089226000
16:00:06.090 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.090230800, lastModified=2020-07-06 16:00:06.090230800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.091 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.090230800 to 2020-07-06 16:00:06.091229600
16:00:06.092 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.092228800, lastModified=2020-07-06 16:00:06.092228800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.093 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.092228800 to 2020-07-06 16:00:06.093229600
16:00:06.094 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.094229400, lastModified=2020-07-06 16:00:06.094229400, size=1, fileKey=java.lang.Object@b34832b
16:00:06.095 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.094229400 to 2020-07-06 16:00:06.095229100
16:00:06.096 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.096228900, lastModified=2020-07-06 16:00:06.096228900, size=1, fileKey=java.lang.Object@b34832b
16:00:06.097 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.096228900 to 2020-07-06 16:00:06.097225100
16:00:06.098 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.098228400, lastModified=2020-07-06 16:00:06.098228400, size=1, fileKey=java.lang.Object@b34832b
16:00:06.100 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.098228400 to 2020-07-06 16:00:06.099232800
16:00:06.101 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.100226400, lastModified=2020-07-06 16:00:06.100226400, size=1, fileKey=java.lang.Object@b34832b
16:00:06.102 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.100226400 to 2020-07-06 16:00:06.102228000
16:00:06.103 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.102228000, lastModified=2020-07-06 16:00:06.102228000, size=1, fileKey=java.lang.Object@b34832b
16:00:06.104 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.102228000 to 2020-07-06 16:00:06.104225900
16:00:06.105 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.104225900, lastModified=2020-07-06 16:00:06.104225900, size=1, fileKey=java.lang.Object@b34832b
16:00:06.106 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.104225900 to 2020-07-06 16:00:06.106223400
16:00:06.107 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.107224200, lastModified=2020-07-06 16:00:06.107224200, size=1, fileKey=java.lang.Object@b34832b
16:00:06.108 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.107224200 to 2020-07-06 16:00:06.108227500
16:00:06.109 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.109227300, lastModified=2020-07-06 16:00:06.109227300, size=1, fileKey=java.lang.Object@b34832b
16:00:06.110 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.109227300 to 2020-07-06 16:00:06.110226500
16:00:06.111 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.111222700, lastModified=2020-07-06 16:00:06.111222700, size=1, fileKey=java.lang.Object@b34832b
16:00:06.112 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.111222700 to 2020-07-06 16:00:06.112226100
16:00:06.113 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.113225800, lastModified=2020-07-06 16:00:06.113225800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.114 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.113225800 to 2020-07-06 16:00:06.114226100
16:00:06.115 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.115225800, lastModified=2020-07-06 16:00:06.115225800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.116 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.115225800 to 2020-07-06 16:00:06.116224600
16:00:06.117 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.117223800, lastModified=2020-07-06 16:00:06.117223800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.119 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.117223800 to 2020-07-06 16:00:06.118225600
16:00:06.120 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.119225400, lastModified=2020-07-06 16:00:06.119225400, size=1, fileKey=java.lang.Object@b34832b
16:00:06.121 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.119225400 to 2020-07-06 16:00:06.120218000
16:00:06.122 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.121223900, lastModified=2020-07-06 16:00:06.121223900, size=1, fileKey=java.lang.Object@b34832b
16:00:06.123 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.121223900 to 2020-07-06 16:00:06.122218500
16:00:06.124 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.123227000, lastModified=2020-07-06 16:00:06.123227000, size=1, fileKey=java.lang.Object@b34832b
16:00:06.125 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.123227000 to 2020-07-06 16:00:06.125220400
16:00:06.126 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.126223200, lastModified=2020-07-06 16:00:06.126223200, size=1, fileKey=java.lang.Object@b34832b
16:00:06.127 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.126223200 to 2020-07-06 16:00:06.127224500
16:00:06.128 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.128222700, lastModified=2020-07-06 16:00:06.128222700, size=1, fileKey=java.lang.Object@b34832b
16:00:06.129 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.128222700 to 2020-07-06 16:00:06.129219400
16:00:06.130 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.130225800, lastModified=2020-07-06 16:00:06.130225800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.131 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.130225800 to 2020-07-06 16:00:06.131225600
16:00:06.132 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.132223800, lastModified=2020-07-06 16:00:06.132223800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.133 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.132223800 to 2020-07-06 16:00:06.133224100
16:00:06.134 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.134223800, lastModified=2020-07-06 16:00:06.134223800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.135 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.134223800 to 2020-07-06 16:00:06.135225100
16:00:06.136 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.136222300, lastModified=2020-07-06 16:00:06.136222300, size=1, fileKey=java.lang.Object@b34832b
16:00:06.137 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.136222300 to 2020-07-06 16:00:06.137221600
16:00:06.138 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.138222300, lastModified=2020-07-06 16:00:06.138222300, size=1, fileKey=java.lang.Object@b34832b
16:00:06.139 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.138222300 to 2020-07-06 16:00:06.139221600
16:00:06.140 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.140220800, lastModified=2020-07-06 16:00:06.140220800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.141 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.140220800 to 2020-07-06 16:00:06.141220600
16:00:06.143 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.142218300, lastModified=2020-07-06 16:00:06.142218300, size=1, fileKey=java.lang.Object@b34832b
16:00:06.144 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.142218300 to 2020-07-06 16:00:06.144218300
16:00:06.145 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.145219100, lastModified=2020-07-06 16:00:06.145219100, size=1, fileKey=java.lang.Object@b34832b
16:00:06.146 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.145219100 to 2020-07-06 16:00:06.146218400
16:00:06.147 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.147220200, lastModified=2020-07-06 16:00:06.147220200, size=1, fileKey=java.lang.Object@b34832b
16:00:06.148 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.147220200 to 2020-07-06 16:00:06.148218900
16:00:06.149 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.149222800, lastModified=2020-07-06 16:00:06.149222800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.151 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.149222800 to 2020-07-06 16:00:06.150213300
16:00:06.152 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.151216100, lastModified=2020-07-06 16:00:06.151216100, size=1, fileKey=java.lang.Object@b34832b
16:00:06.153 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.151216100 to 2020-07-06 16:00:06.152219500
16:00:06.154 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.153217700, lastModified=2020-07-06 16:00:06.153217700, size=1, fileKey=java.lang.Object@b34832b
16:00:06.155 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.153217700 to 2020-07-06 16:00:06.154215900
16:00:06.156 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.155221800, lastModified=2020-07-06 16:00:06.155221800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.157 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.155221800 to 2020-07-06 16:00:06.156210800
16:00:06.158 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.157215200, lastModified=2020-07-06 16:00:06.157215200, size=1, fileKey=java.lang.Object@b34832b
16:00:06.159 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.157215200 to 2020-07-06 16:00:06.158212400
16:00:06.160 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.159216300, lastModified=2020-07-06 16:00:06.159216300, size=1, fileKey=java.lang.Object@b34832b
16:00:06.161 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.159216300 to 2020-07-06 16:00:06.160212400
16:00:06.162 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.161216800, lastModified=2020-07-06 16:00:06.161216800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.163 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.161216800 to 2020-07-06 16:00:06.162215500
16:00:06.164 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.163212700, lastModified=2020-07-06 16:00:06.163212700, size=1, fileKey=java.lang.Object@b34832b
16:00:06.165 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.163212700 to 2020-07-06 16:00:06.165212300
16:00:06.166 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.165212300, lastModified=2020-07-06 16:00:06.165212300, size=1, fileKey=java.lang.Object@b34832b
16:00:06.167 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.165212300 to 2020-07-06 16:00:06.167215900
16:00:06.168 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.168217700, lastModified=2020-07-06 16:00:06.167215900, size=1, fileKey=java.lang.Object@b34832b
16:00:06.169 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.167215900 to 2020-07-06 16:00:06.169215400
16:00:06.170 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.169215400, lastModified=2020-07-06 16:00:06.169215400, size=1, fileKey=java.lang.Object@b34832b
16:00:06.170 DEBUG: Thread[main,5,main]: use fallback timestamp resolution for directory C:\build\.git
16:00:06.170 DEBUG: file=C:\build\.git\index, create new FileSnapshot: lastRead=2020-07-06 16:00:06.040239300, lastModified=2020-07-06 15:13:53.461609900, size=3856805, fileKey=java.lang.Object@b34832b
16:00:06.171 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.169215400 to 2020-07-06 16:00:06.171215900
16:00:06.172 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.171215900, lastModified=2020-07-06 16:00:06.171215900, size=1, fileKey=java.lang.Object@b34832b
16:00:06.173 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.171215900 to 2020-07-06 16:00:06.173216000
16:00:06.174 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.173216000, lastModified=2020-07-06 16:00:06.173216000, size=1, fileKey=java.lang.Object@b34832b
16:00:06.175 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.173216000 to 2020-07-06 16:00:06.175215000
16:00:06.176 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.175215000, lastModified=2020-07-06 16:00:06.175215000, size=1, fileKey=java.lang.Object@b34832b
16:00:06.177 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.175215000 to 2020-07-06 16:00:06.177209400
16:00:06.178 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.178215800, lastModified=2020-07-06 16:00:06.177209400, size=1, fileKey=java.lang.Object@b34832b
16:00:06.179 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.177209400 to 2020-07-06 16:00:06.179210400
16:00:06.180 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.180212200, lastModified=2020-07-06 16:00:06.179210400, size=1, fileKey=java.lang.Object@b34832b
16:00:06.181 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.179210400 to 2020-07-06 16:00:06.181208900
16:00:06.182 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.182213800, lastModified=2020-07-06 16:00:06.182213800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.184 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.182213800 to 2020-07-06 16:00:06.184214800
16:00:06.185 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.185212000, lastModified=2020-07-06 16:00:06.185212000, size=1, fileKey=java.lang.Object@b34832b
16:00:06.186 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.185212000 to 2020-07-06 16:00:06.186224600
16:00:06.188 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.188207700, lastModified=2020-07-06 16:00:06.188207700, size=1, fileKey=java.lang.Object@b34832b
16:00:06.189 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.188207700 to 2020-07-06 16:00:06.189213600
16:00:06.190 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.190204700, lastModified=2020-07-06 16:00:06.190204700, size=1, fileKey=java.lang.Object@b34832b
16:00:06.191 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.190204700 to 2020-07-06 16:00:06.191210100
16:00:06.192 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.192211900, lastModified=2020-07-06 16:00:06.192211900, size=1, fileKey=java.lang.Object@b34832b
16:00:06.193 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.192211900 to 2020-07-06 16:00:06.193211100
16:00:06.194 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.194209900, lastModified=2020-07-06 16:00:06.193211100, size=1, fileKey=java.lang.Object@b34832b
16:00:06.195 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.193211100 to 2020-07-06 16:00:06.195208100
16:00:06.196 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.195208100, lastModified=2020-07-06 16:00:06.195208100, size=1, fileKey=java.lang.Object@b34832b
16:00:06.197 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.195208100 to 2020-07-06 16:00:06.197210200
16:00:06.198 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.197210200, lastModified=2020-07-06 16:00:06.197210200, size=1, fileKey=java.lang.Object@b34832b
16:00:06.199 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.197210200 to 2020-07-06 16:00:06.198210400
16:00:06.200 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.199209700, lastModified=2020-07-06 16:00:06.199209700, size=1, fileKey=java.lang.Object@b34832b
16:00:06.201 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.199209700 to 2020-07-06 16:00:06.200207900
16:00:06.202 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.201204100, lastModified=2020-07-06 16:00:06.201204100, size=1, fileKey=java.lang.Object@b34832b
16:00:06.203 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.201204100 to 2020-07-06 16:00:06.202212500
16:00:06.204 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.203204100, lastModified=2020-07-06 16:00:06.203204100, size=1, fileKey=java.lang.Object@b34832b
16:00:06.205 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.203204100 to 2020-07-06 16:00:06.204208000
16:00:06.206 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.205207700, lastModified=2020-07-06 16:00:06.205207700, size=1, fileKey=java.lang.Object@b34832b
16:00:06.207 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.205207700 to 2020-07-06 16:00:06.206208000
16:00:06.208 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.207207800, lastModified=2020-07-06 16:00:06.207207800, size=1, fileKey=java.lang.Object@b34832b
16:00:06.209 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.207207800 to 2020-07-06 16:00:06.208208500
16:00:06.210 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, create new FileSnapshot: lastRead=2020-07-06 16:00:06.209211900, lastModified=2020-07-06 16:00:06.209211900, size=1, fileKey=java.lang.Object@b34832b
16:00:06.211 DEBUG: file=C:\build\.git\.probe-1c72afa8-e6f7-4026-a443-cf84be7fe320, lastModified changed from 2020-07-06 16:00:06.209211900 to 2020-07-06 16:00:06.210205500

The only info I found regarding those .prob-<UUID> files is that JGit seems to have an issue with NFS drives (which I’m not sure applies here, since in theory the Docker image should be considering its internal drives as regular, local drives).

Deleting the .gitignore files from the repo didn’t make any difference.

Steps to reproduce

  1. Setup a Windows Docker image with all of the necessary tools installed:
    • .NET 4.8
    • NuGet
    • Windows ASP.NET 4.5
    • Visual Studio Build Tools 16
    • SonarScanner for MSBuild
    • dotCover Console Runner
    • NUnit3
    • NUnit V2 driver extension
    • OpenJDK 14
  2. Create a Dockerfile using the above image and build it
    • Ensure the ENTRYPOINT is a script (present in the repo to be used) that runs SonarScanner for MSBuild with the parameters mentioned above
  3. Clone the repo
  4. Run the Docker image and point its workspace to the cloned repo

Potential workaround

Run the scanner with -d:sonar.scm.exclusions.disabled=true and add the exclusions configured on .gitignore manually (using -d:sonar.exclusions).

Hi @cobrabr

Did you copy your .git folder inside your docker image along with your code to be analyzed ?

Mickaël

I believe so, yes. We clone the repo to C:\build and that’s the path we pass as VOLUME in the Dockerfile. Since we also use Git to determine the version (via git describe --tags) and that part is working, it stands to reason that Git can recognize the folder as a repo (which means the .git folder is in there).

Thanks, so then you should make sure that the paths are matching between the .git and the files currently analyzed (looks like windows paths in linux containers are transformed by forward slashes instead of backslashes, … so that can be tricky to fulfill.

We’re using a Windows container, though.