SonarLint 2.1.1: Request sonarlint/isIgnoredByScm failed with message: Git model not found

Hi,

I am using SonarLint in this context :

  • Ubuntu 18.04 LTS (64 bit), updated from official repositories on August 1st 2021
  • VSCode 1.59.1
  • connected mode to SonarQube Enterprise Edition 7.9 LTS (build 26994)
    "sonarlint.connectedMode.connections.sonarqube": [
        {
            "connectionId" : "SBI",
            "serverUrl": "https://...",
            "token": "..."
        }
    ],
    "sonarlint.connectedMode.project": {
        "connectionId" : "SBI",
        "projectKey": "..."
    },
    "sonarlint.ls.javaHome": "/opt/jdk-11.0.12+7",
    "sonarlint.output.showVerboseLogs": true,
    "sonarlint.trace.server": "off",

Until now, I was using version 2.0.0 of SonarLint extension to VSCode, and everything was fine :

Executing /opt/jdk-11.0.12+7/bin/java -jar /home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.0.0/server/sonarlint-ls.jar 32779 file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.0.0/analyzers/sonarjava.jar file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.0.0/analyzers/sonarjs.jar file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.0.0/analyzers/sonarphp.jar file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.0.0/analyzers/sonarpython.jar file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.0.0/analyzers/sonarhtml.jar
[stdout] Binding to 32779
Child process connected on port 32779
[stderr] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[stderr] SLF4J: Defaulting to no-operation (NOP) logger implementation
[stderr] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[Info  - 18:07:42.065] Started security hotspot handler on port 64120
[Debug - 18:07:44.925] Enabling notifications for project 'MY_PROJECT_KEY' on connection 'SBI'
[Debug - 18:07:44.960] Default settings updated: WorkspaceFolderSettings[analyzerProperties={},testFilePattern=,connectionId=SBI,projectKey=MY_PROJECT_KEY]
[Debug - 18:07:45.084] Create : /home/mycompany/.sonarlint/plugins
[Debug - 18:07:45.084] Plugin cache: /home/mycompany/.sonarlint/plugins
[Debug - 18:07:45.085] Create : /home/mycompany/.sonarlint/plugins/_tmp
[Debug - 18:07:45.230] Plugins:
[Debug - 18:07:45.234]   * Python Code Quality and Security 3.5.0.8244 (python)
[Debug - 18:07:45.235]   * Java Code Quality and Security 6.15.1.26025 (java)
[Debug - 18:07:45.241]   * HTML Code Quality and Security 3.4.0.2754 (web)
[Debug - 18:07:45.241]   * PHP Code Quality and Security 3.17.0.7439 (php)
[Debug - 18:07:45.273] Load plugins
[Debug - 18:07:45.570] Load plugins (done) | time=297ms
[Debug - 18:07:45.931] Plugins:
[Debug - 18:07:45.932]   * License for SonarLint 7.9 (license)
[Debug - 18:07:45.932]   * Python Code Quality and Security 2.13.0.7236 (python)
[Debug - 18:07:45.932]   * Java Code Quality and Security 6.3.2.22818 (java)
[Debug - 18:07:45.937]   * SonarHTML 3.2.0.2082 (web)
[Debug - 18:07:45.937]   * PHP Code Quality and Security 3.5.0.5655 (php)
[Debug - 18:07:45.938]   * SonarTS 2.1.0.4359 (typescript)
[Debug - 18:07:45.938]   * SonarJS 6.2.1.12157 (javascript)
[Debug - 18:07:45.938]   * SonarPLSQL 3.4.1.2576 (plsql)
[Info  - 18:07:45.969] Using storage for connection 'SBI' (last update 8/20/21, 4:36 PM)
[Info  - 18:07:47.302] Creating container for module with key=file:///home/mycompany/w/my_project
[Debug - 18:07:47.339] SonarLint engine started for connection 'SBI'
[Debug - 18:07:49.549] Resolved binding ProjectBinding[projectKey=MY_PROJECT_KEY,sqPathPrefix=,idePathPrefix=] for folder /home/mycompany/w/my_project
[Debug - 18:07:49.825] Server excluded sources: 
[Debug - 18:07:49.825]   **/*.exe
[Debug - 18:07:49.825]   **/*.so
[Debug - 18:07:49.825]   **/*.tar
[Debug - 18:07:49.825]   **/*.tar.gz
[Debug - 18:07:49.826]   **/*.zip
[Debug - 18:07:49.839]   **/*.rar
[Debug - 18:07:49.841]   **/*.7z
[Debug - 18:07:49.842]   **/*.gif
[Debug - 18:07:49.842]   **/*.jpg
[Debug - 18:07:49.844]   **/*.png
[Debug - 18:07:49.844]   **/*.deb
[Debug - 18:07:49.844]   **/*.class
[Debug - 18:07:49.844]   **/*.jar
[Debug - 18:07:49.844]   **/*.war
[Debug - 18:07:49.849]   **/*.json
[Debug - 18:07:49.849]   **/*.css
[Debug - 18:07:49.849]   **/*.less
[Debug - 18:07:49.849]   **/*.scss
[Info  - 18:07:49.870] Analyzing file 'file:///home/mycompany/w/my_project/s-restapi/scripts/s_restapi.py'...
[Debug - 18:07:49.874] Analysis triggered on 'file:///home/mycompany/w/my_project/s-restapi/scripts/s_restapi.py' with configuration: 
[
  projectKey: MY_PROJECT_KEY
  baseDir: /home/mycompany/w/my_project
  extraProperties: {}
  moduleKey: file:///home/mycompany/w/my_project
  inputFiles: [
    file:///home/mycompany/w/my_project/s-restapi/scripts/s_restapi.py (UTF-8) [py]
  ]
]

[Debug - 18:07:51.300] Checking binding updates
[Debug - 18:07:51.567] Create : /home/mycompany/.sonarlint/plugins
[Debug - 18:07:51.567] Plugin cache: /home/mycompany/.sonarlint/plugins
[Debug - 18:07:51.567] Create : /home/mycompany/.sonarlint/plugins/_tmp
[Debug - 18:07:53.552] GET 200 https://mycompany.com/api/system/status | response time=1928ms
[Debug - 18:07:53.593] Downloaded server infos in 1969ms
[Info  - 18:07:53.604] Creating container for module with key=file:///home/mycompany/w/my_project
[Debug - 18:07:53.751] Standalone SonarLint engine started
[Debug - 18:07:53.813] GET 200 https://mycompany.com/api/settings/values.protobuf | response time=181ms
[Info  - 18:07:54.041] Downloaded settings in 409ms
[Debug - 18:07:54.206] GET 200 https://mycompany.com/api/plugins/installed | response time=77ms
[Info  - 18:07:54.318] Downloaded plugin list in 189ms
[Debug - 18:07:54.334] Code analyzer 'bugscrawler' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.334] Code analyzer 'csharp' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.334] Code analyzer 'cpp' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.334] Code analyzer 'cocoreporttransformer' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.334] Code analyzer 'crowd' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.335] Code analyzer 'dashboardsPlugin' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.339] Code analyzer 'jacoco' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.347] Code analyzer 'ldap' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.348] Code analyzer 'maturity' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.348] Code analyzer 'sonarcommonproperties' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.348] Code analyzer 'cssfamily' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.348] Code analyzer 'swift' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.348] Code analyzer 'tlcatcher' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.348] Code analyzer 'security' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.348] Code analyzer 'securitycsharpfrontend' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.349] Code analyzer 'securityjavafrontend' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.349] Code analyzer 'securityphpfrontend' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:54.502] GET 200 https://mycompany.com/api/qualityprofiles/search.protobuf | response time=128ms
[Debug - 18:07:54.622] Downloaded quality profiles in 248ms
[Debug - 18:07:54.728] GET 200 https://mycompany.com/api/settings/values.protobuf | response time=64ms
[Info  - 18:07:54.744] Downloaded settings in 80ms
[Debug - 18:07:54.836] GET 200 https://mycompany.com/api/qualityprofiles/search.protobuf?project=MY_PROJECT_KEY | response time=80ms
[Debug - 18:07:54.838] Downloaded project quality profiles in 83ms
[Debug - 18:07:54.909] GET 200 https://mycompany.com/api/settings/values.protobuf?component=MY_PROJECT_KEY | response time=70ms
[Info  - 18:07:54.922] Downloaded settings in 83ms
[Debug - 18:07:55.042] Page downloaded in 71ms
[Debug - 18:07:55.078] Create : /home/mycompany/.sonarlint/plugins
[Debug - 18:07:55.078] Plugin cache: /home/mycompany/.sonarlint/plugins
[Debug - 18:07:55.078] Create : /home/mycompany/.sonarlint/plugins/_tmp
[Debug - 18:07:55.181] GET 200 https://mycompany.com/api/system/status | response time=58ms
[Debug - 18:07:55.182] Downloaded server infos in 59ms
[Debug - 18:07:55.245] GET 200 https://mycompany.com/api/settings/values.protobuf | response time=62ms
[Info  - 18:07:55.252] Downloaded settings in 69ms
[Debug - 18:07:55.311] GET 200 https://mycompany.com/api/plugins/installed | response time=58ms
[Info  - 18:07:55.318] Downloaded plugin list in 65ms
[Debug - 18:07:55.318] Code analyzer 'bugscrawler' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.318] Code analyzer 'csharp' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.318] Code analyzer 'cpp' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.318] Code analyzer 'cocoreporttransformer' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.319] Code analyzer 'crowd' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.319] Code analyzer 'dashboardsPlugin' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.331] Code analyzer 'jacoco' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.331] Code analyzer 'ldap' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.331] Code analyzer 'maturity' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.331] Code analyzer 'sonarcommonproperties' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.332] Code analyzer 'cssfamily' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.332] Code analyzer 'swift' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.332] Code analyzer 'tlcatcher' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.332] Code analyzer 'security' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.332] Code analyzer 'securitycsharpfrontend' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.332] Code analyzer 'securityjavafrontend' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.332] Code analyzer 'securityphpfrontend' is not compatible with SonarLint. Skip downloading it.
[Debug - 18:07:55.441] GET 200 https://mycompany.com/api/qualityprofiles/search.protobuf | response time=108ms
[Debug - 18:07:55.464] Downloaded quality profiles in 131ms
[Debug - 18:07:55.574] GET 200 https://mycompany.com/api/settings/values.protobuf | response time=65ms
[Info  - 18:07:55.578] Downloaded settings in 69ms
[Debug - 18:07:55.655] GET 200 https://mycompany.com/api/qualityprofiles/search.protobuf?project=MY_PROJECT_KEY | response time=77ms
[Debug - 18:07:55.656] Downloaded project quality profiles in 78ms
[Debug - 18:07:55.722] GET 200 https://mycompany.com/api/settings/values.protobuf?component=MY_PROJECT_KEY | response time=66ms
[Info  - 18:07:55.729] Downloaded settings in 73ms
[Debug - 18:07:55.793] Page downloaded in 63ms
[stderr] WARNING: An illegal reflective access operation has occurred
[stderr] WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/home/mycompany/.sonarlint/plugins/52f5340dd05620cd162e2b9a45a57124/sonar-javascript-plugin-6.2.1.12157.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
[stderr] WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
[stderr] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[stderr] WARNING: All illegal access operations will be denied in a future release
[Debug - 18:08:19.969] fetchServerIssues projectKey=MY_PROJECT_KEY, ideFilePath=s-restapi/scripts/s_restapi.py
[Debug - 18:08:20.461] GET 200 https://mycompany.com/batch/issues?key=MY_PROJECT_KEY%3As-restapi%2Fscripts%2Fs_restapi.py | response time=416ms
[Debug - 18:08:20.466] Downloaded issues in 435ms
[Info  - 18:08:20.557] Found 3 issues
[Debug - 18:08:41.732] GET 200 https://mycompany.com/api/developers/search_events?projects=MY_PROJECT_KEY&from=2021-08-22T18%3A08%3A41%2B0200 | response time=387ms

But as soon as I upgrade the SonarLint extension to the latest version (2.1.1), analysis is not done anymore :

Executing /opt/jdk-11.0.12+7/bin/java -jar /home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/server/sonarlint-ls.jar 41443 -analyzers file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/analyzers/sonarjava.jar file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/analyzers/sonarjs.jar file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/analyzers/sonarphp.jar file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/analyzers/sonarpython.jar file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/analyzers/sonarhtml.jar -extraAnalyzers file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/analyzers/sonarsecrets.jar
[stdout] Binding to 41443
Child process connected on port 41443
[stderr] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[stderr] SLF4J: Defaulting to no-operation (NOP) logger implementation
[stderr] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[Info  - 18:28:18.849] Started security hotspot handler on port 64120
[Debug - 18:28:19.656] Enabling notifications for project 'MY_PROJECT_KEY' on connection 'SBI'
[Debug - 18:28:19.679] Default settings updated: WorkspaceFolderSettings[analyzerProperties={},testFilePattern=,connectionId=SBI,projectKey=MY_PROJECT_KEY]
[Debug - 18:28:28.033] Checking binding updates
[Debug - 18:29:19.210] GET 200 https://mycompany.com/api/developers/search_events?projects=MY_PROJECT_KEY&from=2021-08-22T18%3A29%3A18%2B0200 | response time=1122ms
[Debug - 18:29:59.936] Queuing analysis of file 'file:///home/mycompany/w/my_project/s-restapi/scripts/s_restapi.py'
[Debug - 18:30:00.116] Starting connected SonarLint engine for 'SBI'...
[Debug - 18:30:00.152] Looking for node in the PATH
[Debug - 18:30:00.182] Execute command 'which node'...
[stderr] Exception in thread "SonarLint analysis" java.util.concurrent.CompletionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request sonarlint/isIgnoredByScm failed with message: Git model not found
[stderr] 	at java.base/java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:412)
[stderr] 	at java.base/java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2044)
[stderr] 	at org.sonarsource.sonarlint.ls.AnalysisManager.lambda$analyze$5(AnalysisManager.java:302)
[stderr] 	at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133)
[stderr] 	at org.sonarsource.sonarlint.ls.AnalysisManager.analyze(AnalysisManager.java:302)
[stderr] 	at org.sonarsource.sonarlint.ls.AnalysisManager.lambda$analyzeAsync$4(AnalysisManager.java:292)
[stderr] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[stderr] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[stderr] 	at java.base/java.lang.Thread.run(Thread.java:829)
[stderr] Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request sonarlint/isIgnoredByScm failed with message: Git model not found
[stderr] 	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
[stderr] 	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
[stderr] 	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
[stderr] 	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
[stderr] 	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
[stderr] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[stderr] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[stderr] 	... 3 more
[Debug - 18:30:00.351] Command 'which node' exited with 0
stdout: /usr/bin/node
[Debug - 18:30:00.356] Found node at /usr/bin/node
[Debug - 18:30:00.356] Checking node version...
[Debug - 18:30:00.360] Execute command '/usr/bin/node -v'...
[Debug - 18:30:00.417] Command '/usr/bin/node -v' exited with 0
stdout: v8.10.0
[Debug - 18:30:00.418] Detected node version: 8.10.0
[Debug - 18:30:01.121] Create : /home/mycompany/.sonarlint/plugins
[Debug - 18:30:01.121] Plugin cache: /home/mycompany/.sonarlint/plugins
[Debug - 18:30:01.121] Create : /home/mycompany/.sonarlint/plugins/_tmp
[Debug - 18:30:01.385] Load plugins
[Debug - 18:30:02.019] Load plugins (done) | time=634ms
[Debug - 18:30:02.679] Plugins:
[Debug - 18:30:02.681]   * License for SonarLint 7.9 (license)
[Debug - 18:30:02.681]   * Python Code Quality and Security 2.13.0.7236 (python)
[Debug - 18:30:02.681]   * Java Code Quality and Security 6.3.2.22818 (java)
[Debug - 18:30:02.683]   * SonarHTML 3.2.0.2082 (web)
[Debug - 18:30:02.686]   * PHP Code Quality and Security 3.5.0.5655 (php)
[Debug - 18:30:02.686]   * SonarTS 2.1.0.4359 (typescript)
[Debug - 18:30:02.693]   * Sonar Secrets Plugin for SonarQube 1.0.0.34655 (secrets)
[Debug - 18:30:02.693]   * SonarJS 6.2.1.12157 (javascript)
[Debug - 18:30:02.696]   * SonarPLSQL 3.4.1.2576 (plsql)
[Info  - 18:30:03.555] Using storage for connection 'SBI' (last update 8/20/21, 4:36 PM)
[Info  - 18:30:04.887] Creating container for module with key=file:///home/mycompany/w/my_project
[Debug - 18:30:04.958] SonarLint engine started for connection 'SBI'
[Debug - 18:30:07.155] Resolved binding ProjectBinding[projectKey=MY_PROJECT_KEY,sqPathPrefix=,idePathPrefix=] for folder /home/mycompany/w/my_project
[Debug - 18:30:18.491] GET 200 https://mycompany.com/api/developers/search_events?projects=MY_PROJECT_KEY&from=2021-08-22T18%3A29%3A18%2B0200 | response time=420ms

As a hunch, I upgraded nodejs from 8.10.0 to 14.17.5, but it does not solve my issue:

Executing /opt/jdk-11.0.12+7/bin/java -jar /home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/server/sonarlint-ls.jar 35755 -analyzers file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/analyzers/sonarjava.jar file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/analyzers/sonarjs.jar file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/analyzers/sonarphp.jar file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/analyzers/sonarpython.jar file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/analyzers/sonarhtml.jar -extraAnalyzers file:///home/mycompany/.vscode/extensions/sonarsource.sonarlint-vscode-2.1.1/analyzers/sonarsecrets.jar
[stdout] Binding to 35755
Child process connected on port 35755
[stderr] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[stderr] SLF4J: Defaulting to no-operation (NOP) logger implementation
[stderr] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[Info  - 01:18:51.107] Started security hotspot handler on port 64120
[stderr] Exception in thread "SonarLint analysis" java.util.concurrent.CompletionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request sonarlint/isIgnoredByScm failed with message: Git model not found
[stderr] 	at java.base/java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:412)
[stderr] 	at java.base/java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2044)
[stderr] 	at org.sonarsource.sonarlint.ls.AnalysisManager.lambda$analyze$5(AnalysisManager.java:302)
[stderr] 	at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133)
[stderr] 	at org.sonarsource.sonarlint.ls.AnalysisManager.analyze(AnalysisManager.java:302)
[stderr] 	at org.sonarsource.sonarlint.ls.AnalysisManager.lambda$analyzeAsync$4(AnalysisManager.java:292)
[stderr] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[stderr] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[stderr] 	at java.base/java.lang.Thread.run(Thread.java:829)
[stderr] Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Request sonarlint/isIgnoredByScm failed with message: Git model not found
[stderr] 	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:209)
[stderr] 	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:193)
[stderr] 	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
[stderr] 	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
[stderr] 	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
[stderr] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[stderr] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[stderr] 	... 3 more
[Debug - 01:18:52.167] Enabling notifications for project 'MY_PROJECT_KEY' on connection 'SBI'
[Debug - 01:18:52.194] Default settings updated: WorkspaceFolderSettings[analyzerProperties={},testFilePattern=,connectionId=SBI,projectKey=MY_PROJECT_KEY]
[Debug - 01:18:52.338] Create : /home/mycompany/.sonarlint/plugins
[Debug - 01:18:52.339] Plugin cache: /home/mycompany/.sonarlint/plugins
[Debug - 01:18:52.342] Create : /home/mycompany/.sonarlint/plugins/_tmp
[Debug - 01:18:52.820] Load plugins
[Debug - 01:18:53.033] Load plugins (done) | time=210ms
[Debug - 01:18:53.289] Plugins:
[Debug - 01:18:53.289]   * Python Code Quality and Security 3.6.0.8488 (python)
[Debug - 01:18:53.289]   * Java Code Quality and Security 7.2.0.26923 (java)
[Debug - 01:18:53.289]   * HTML Code Quality and Security 3.4.0.2754 (web)
[Debug - 01:18:53.290]   * PHP Code Quality and Security 3.18.0.7718 (php)
[Debug - 01:18:53.290]   * Sonar Secrets Plugin for SonarQube 1.0.0.34655 (secrets)
[Debug - 01:18:53.290]   * JavaScript/TypeScript Code Quality and Security 8.1.0.15788 (javascript)
[Info  - 01:18:59.587] Creating container for module with key=file:///home/mycompany/w/my_project
[Debug - 01:18:59.602] Standalone SonarLint engine started
[Debug - 01:19:00.590] Checking binding updates

NOTE: my project does NOT use GIT :sob:, but SVN version 1.9.7

Hello

I have the similar issue with SonarQube 8.9.1 Dev edition and we don’t use SCM tool.

With Sonarlint 2.1.1 we have this issue in VSCode:

[Info  - 08:22:25.040] Downloaded settings in 114ms
Error on git gitCommand: Error: Command failed: "C:\Program Files\Git\cmd\git.exe" check-ignore pkg_diva_utils.sql
fatal: not a git repository (or any of the parent directories): .git

Is there a new setting to define in settings.json ?

Thanks

Hello,

Thanks for reporting, I confirm that there are issues introduced in the latest release for projects that don’t use Git.

@cyril.og just to confirm did you explicitly disabled the Git extension in your user settings ? I managed to reproduce your issue by unticking this box:

Capture d’écran de 2021-08-23 10-07-28

I created tickets to fix the issues (here and there) and we are already working on them. We plan to do a bufix release today or tomorrow.

Thanks again and sorry for the incovenience

Thank you @Damien_Urruty

I confirm that I explicitly disable the Git extension in the user settings :
GIT is not enabled

Note: I also tried to disable the builtin GIT extension in VSCode. But that did not solve the issue either.

Why does Sonarlint try to know if a file is GIT-ignored or not ?

If it is useful, then what about trying to know if a file is “SCM”-ignored or not, in a more generic way ?

I understand that GIT is the only SCM extension which is built-in in VSCode, thus the only one that is available and installed by default, and also that GIT is the more-widely used SCM worldwide.

But our SCM is SVN (no choice here :sob:) , and we use the johnstoncode.svn-scm extension in vscode.

Maybe vscode offers a generic API to access SCM properties ?
Something you could access through scm/resourceState/context ?

I just enabled GIT in the settings of vscode.
All settings of the GIT extension now have their default values.

But the issue is still there.

In this latest release of SonarLint we introduced a new feature which is secrets detection. We don’t want to detect secrets in files that are not under source control because the secrets won’t be shared with anyone, that’s why we need to check if the file is gitignored. And Git is the only SCM that we support for the moment. But it should definitely not cause errors if other SCMs are used, and the file should be considered as not ignored.

Even after restarting VSCode ?

It’s not the case unfortunately, and the specific extension point you suggested does not have the same purpose

Yes sir !

The SonarLint for VSCode 2.1.2 version has just been released. It fixes the issues you raised above, which are errors when the git extension is not enabled or when the project is not using git.

Could you please update and confirm if this release solves your issues ?

Thanks again for reporting

Hello,
Thanks for the quick fix.

I updated Sonarlint and I confirm it is (almost) working.
I have the Sonar issues displayed in VSCode (was not the case with v2.1.1) but I still have the issue related to git:

Error on git command ""C:\Program Files\Git\cmd\git.exe" check-ignore pkg_diverses.sql": Error: Command failed: "C:\Program Files\Git\cmd\git.exe" check-ignore pkg_diverses.sql
fatal: not a git repository (or any of the parent directories): .git

[Info  - 14:32:40.000] Analyzing file 'file:///v:/PACKAGES/pkg_divers.sql'...
[Info  - 14:32:40.190] Found 95 issues

Should I do something or change a setting ?

Thanks

I tested on Linux, with AND without enabling GIT in the vscode settings.
And it works.
Thanks a lot :+1:

1 Like

Finally all good.
Seeing Cyril comment I remembered I did not disabled GIT in VSCode.

I disabled it and now I did not have the error.

Thanks

1 Like

What you observe is just a log, the error is caught and the analysis is working fine. Now thinking about it I realize that it could be a bit noisy, I created a ticket to remove the logs. This is a minor improvement and we will fix this for the next release (not planned yet).

Thank you for the follow-up!

Thanks, this is perfect.

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