Typescript Serverless Monorepo with 200+ projects

SonarScanner 5.0.1.3006
Java 21.0.3 Homebrew (64-bit)
Mac OS X 14.5 aarch64
SonarQube server Enterprise 10.5.1.90531
[...]
Plugins loaded:
  * Python Code Quality and Security 4.17.0.14845 (python)
  * Clean as You Code 2.3.0.1782 (cayc)
  * JaCoCo 1.3.0.1538 (jacoco)
  * IaC Code Quality and Security 1.27.0.9518 (iac)
  * jDepend 1.1.1 (jdepend)
  * Text Code Quality and Security 2.10.0.2188 (textenterprise)
  * Flutter 0.5.1 (flutter)
  * Groovy 1.8 (groovy)
  * XML Code Quality and Security 2.10.0.4108 (xml)
  * Rules Compliance Index (RCI) 1.0.2 (rci)
  * SoftVis3D Sonar plugin 1.3.0 (softvis3d)
  * Text Code Quality and Security 2.10.0.2188 (text)
  * Checkstyle 10.12.5 (checkstyle)
Loaded core extensions: developer-scanner
[...]
3781 non excluded files in this Git repository

Hello !

I want to install sonar on a pre-existing project. It’s a serverless monorepo with more than 200+ projects inside.

There is in tsconfig.json file per project and two main tsconfig files that they extends from (some extends the legacy one and the rest extends the new)

My config is the following :


# # Source Coverage
sonar.sources=src/
sonar.source.inclusions=**/*.ts

# Test Coverage
sonar.tests=src/
sonar.test.inclusions=src/**/*.spec.ts,src/**/*.test.ts
sonar.coverage.exclusions=src/**/__snapshots__/**

sonar.exclusions=dist/**,**/node_modules/**,*.zip,**/cdk.out/**,**/.turbo,**/*.d.ts,**/*.spec.ts,**/*.test.ts

I tried this one : sonar.typescript.tsconfigPath=src/config/tsconfig/legacy.json but not effects

What my problem is → Sonar-Scanner take a little bit more than 4 hours to run

Even with DEBUG logs I can only see this :

15:34:13.004 INFO: 
15:34:23.009 INFO: 
15:34:33.014 INFO: 
15:34:43.016 INFO: 
15:34:53.017 INFO: 
15:35:03.020 INFO: 
15:35:13.025 INFO: 
15:35:23.030 INFO: 
15:35:33.036 INFO: 
15:35:43.043 INFO: 
15:35:53.050 INFO: 
15:36:03.057 INFO: 
15:36:13.063 INFO: 
15:36:23.068 INFO: 
15:36:33.074 INFO: 
15:36:43.079 INFO: 
15:36:53.081 INFO: 
15:37:03.086 INFO: 
15:37:13.091 INFO: 
15:37:23.097 INFO: 
15:37:33.102 INFO: 
15:37:43.108 INFO: 
15:37:53.113 INFO: 
15:38:03.119 INFO: 
15:38:13.124 INFO: 
15:38:23.129 INFO: 
15:38:33.133 INFO: 
15:38:43.135 INFO: 
15:38:53.136 INFO: 
15:39:03.142 INFO: 
15:39:13.148 INFO: 
15:39:23.153 INFO: 
15:39:33.158 INFO: 
15:39:43.163 INFO: 
15:39:53.169 INFO: 
15:40:03.171 INFO: 
15:40:13.176 INFO: 
15:40:23.181 INFO: 
15:40:33.187 INFO: 
15:40:43.193 INFO: 
15:40:53.193 INFO: 
15:41:03.198 INFO: 
15:41:13.211 INFO: 
15:41:23.218 INFO: 
15:41:33.223 INFO: 
15:41:43.228 INFO: 
15:41:53.233 INFO: 
15:42:03.237 INFO: 
15:42:13.242 INFO: 
15:42:23.248 INFO: 
15:42:33.250 INFO: 
15:42:43.256 INFO: 
15:42:53.261 INFO: 
15:43:03.266 INFO: 
15:43:13.271 INFO: 
15:43:23.277 INFO: 
15:43:33.280 INFO: 
15:43:43.286 INFO: 
15:43:53.289 INFO: 
15:44:03.293 INFO: 
15:44:13.299 INFO: 
15:44:23.304 INFO: 
15:44:33.309 INFO: 
15:44:43.314 INFO: 
15:44:53.319 INFO: 
15:45:03.324 INFO: 
15:45:13.329 INFO: 
15:45:23.334 INFO: 
15:45:33.340 INFO: 
15:45:43.340 INFO: 
15:45:53.346 INFO: 
15:46:03.351 INFO: 
15:46:13.356 INFO: 
15:46:23.361 INFO: 
15:46:33.366 INFO: 
15:46:43.372 INFO: 
15:46:53.377 INFO: 
15:47:03.382 INFO: 
15:47:13.385 INFO: 
15:47:23.390 INFO: 
15:47:33.396 INFO: 
15:47:43.402 INFO: 
15:47:53.408 INFO: 
15:48:03.412 INFO: 
15:48:13.417 INFO: 
15:48:23.422 INFO: 
15:48:33.427 INFO: 
15:48:43.433 INFO: 
15:48:53.434 INFO: 
15:49:03.437 INFO: 
15:49:13.443 INFO: 
15:49:23.448 INFO: 
15:49:33.453 INFO: 
15:49:43.456 INFO: 
15:49:53.458 INFO: 
15:50:03.460 INFO: 
15:50:13.466 INFO: 
15:50:23.471 INFO: 
15:50:33.476 INFO: 
15:50:43.482 INFO: 
15:50:53.485 INFO: 
15:51:03.493 INFO: 
15:51:13.500 INFO: 
15:51:23.505 INFO: 
15:51:33.508 INFO: 
15:51:43.513 INFO: 
15:51:53.519 INFO: 
15:52:03.524 INFO: 
15:52:13.525 INFO: 
15:52:23.530 INFO: 
15:52:33.531 INFO: 
15:52:43.537 INFO: 
15:52:53.542 INFO: 
15:53:03.547 INFO: 
15:53:13.552 INFO: 
15:53:23.558 INFO: 
15:53:33.563 INFO: 
15:53:43.568 INFO: 
15:53:53.573 INFO: 
15:54:03.575 INFO: 
15:54:13.580 INFO: 
15:54:23.584 INFO: 
15:54:33.589 INFO: 
15:54:43.592 INFO: 
15:54:53.597 INFO: 
15:55:03.598 INFO: 
15:55:13.603 INFO: 
15:55:23.608 INFO: 
15:55:33.614 INFO: 
15:55:43.619 INFO: 
15:55:53.624 INFO: 
15:56:03.627 INFO: 
15:56:13.628 INFO: 
15:56:23.633 INFO: 
15:56:33.637 INFO: 
15:56:43.640 INFO: 
15:56:53.645 INFO: 
15:57:03.651 INFO:

Any idea how to troubleshoot this ? :slight_smile:

N.B : I heard that for monorepos we had to create as many projects as my monorepo contains ?
I’m not sure of the effectivemness of creating and manager 200+ projets on Sonar.

Hi,

There’s a lot going on here. We try to keep it to one topic per thread. Otherwise it can get messy, fast. So let’s concentrate on this part:

Can you provide a full, debug analysis log, please?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Thx,
Ann

Hello I tried before the week-end but it’s been running for more than 3 days now. Had to stop it :confused:

Launched a new one but truncated the end since it’s the same for hours :confused:

09:36:50.537 INFO: Scanner configuration file: /opt/homebrew/Cellar/sonar-scanner/5.0.1.3006/libexec/conf/sonar-scanner.properties
09:36:50.543 INFO: Project root configuration file: /Users/brad_pitt/Work/sample-project/sonar-project.properties
09:36:50.565 INFO: SonarScanner 5.0.1.3006
09:36:50.565 INFO: Java 21.0.3 Homebrew (64-bit)
09:36:50.565 INFO: Mac OS X 14.5 aarch64
09:36:50.657 DEBUG: keyStore is : 
09:36:50.657 DEBUG: keyStore type is : pkcs12
09:36:50.657 DEBUG: keyStore provider is : 
09:36:50.657 DEBUG: init keystore
09:36:50.658 DEBUG: init keymanager of type SunX509
09:36:50.717 DEBUG: Create: /Users/brad_pitt/.sonar/cache
09:36:50.717 INFO: User cache: /Users/brad_pitt/.sonar/cache
09:36:50.717 DEBUG: Create: /Users/brad_pitt/.sonar/cache/_tmp
09:36:50.718 DEBUG: Extract sonar-scanner-api-batch in temp...
09:36:50.720 DEBUG: Get bootstrap index...
09:36:50.721 DEBUG: Download: https://sonar.custom.address/batch/index
09:36:51.199 DEBUG: Get bootstrap completed
09:36:51.200 DEBUG: Create isolated classloader...
09:36:51.206 DEBUG: Start temp cleaning...
09:36:51.209 DEBUG: Temp cleaning done
09:36:51.209 DEBUG: Execution getVersion
09:36:51.217 INFO: Analyzing on SonarQube server 10.5.1.90531
09:36:51.217 INFO: Default locale: "fr_FR", source code encoding: "UTF-8" (analysis is platform dependent)
09:36:51.217 DEBUG: Work directory: /Users/brad_pitt/Work/sample-project/.scannerwork
09:36:51.218 DEBUG: Execution execute
09:36:51.373 DEBUG: Enterprise 10.5.1.90531
09:36:51.474 INFO: Load global settings
09:36:51.835 DEBUG: GET 200 https://sonar.custom.address/api/settings/values.protobuf | time=359ms
09:36:51.859 INFO: Load global settings (done) | time=385ms
09:36:51.873 INFO: Server id: xxxxxx
09:36:51.876 INFO: User cache: /Users/brad_pitt/.sonar/cache
09:36:51.880 INFO: Loading required plugins
09:36:51.881 INFO: Load plugins index
09:36:51.949 DEBUG: GET 200 https://sonar.custom.address/api/plugins/installed | time=68ms
09:36:51.975 INFO: Load plugins index (done) | time=93ms
09:36:51.975 INFO: Load/download plugins
09:36:52.033 INFO: Load/download plugins (done) | time=57ms
09:36:52.033 DEBUG: Plugins not loaded because they are optional: [abap, sonarapex, csharp, cpp, cobol, dbd, dbdjavafrontend, dbdpythonfrontend, flex, go, web, jcl, java, javascript, kotlin, php, pli, plsql, rpg, ruby, sonarscala, swift, tsql, vbnet, vb, security, securitycsharpfrontend, securityjsfrontend, securityjavafrontend, securityphpfrontend, securitypythonfrontend]
09:36:52.072 DEBUG: Plugins loaded:
09:36:52.072 DEBUG:   * Python Code Quality and Security 4.17.0.14845 (python)
09:36:52.072 DEBUG:   * Clean as You Code 2.3.0.1782 (cayc)
09:36:52.072 DEBUG:   * JaCoCo 1.3.0.1538 (jacoco)
09:36:52.072 DEBUG:   * IaC Code Quality and Security 1.27.0.9518 (iac)
09:36:52.072 DEBUG:   * jDepend 1.1.1 (jdepend)
09:36:52.072 DEBUG:   * Text Code Quality and Security 2.10.0.2188 (textenterprise)
09:36:52.072 DEBUG:   * Flutter 0.5.1 (flutter)
09:36:52.072 DEBUG:   * Groovy 1.8 (groovy)
09:36:52.073 DEBUG:   * XML Code Quality and Security 2.10.0.4108 (xml)
09:36:52.073 DEBUG:   * Rules Compliance Index (RCI) 1.0.2 (rci)
09:36:52.073 DEBUG:   * SoftVis3D Sonar plugin 1.3.0 (softvis3d)
09:36:52.073 DEBUG:   * Text Code Quality and Security 2.10.0.2188 (text)
09:36:52.073 DEBUG:   * Checkstyle 10.12.5 (checkstyle)
09:36:52.098 INFO: Loaded core extensions: developer-scanner
09:36:52.109 DEBUG: Installed core extension: developer-scanner
09:36:52.200 DEBUG: register org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda/0x0000007001315630@6f9ad11c with shutdown hook
09:36:52.270 INFO: Process project properties
09:36:52.273 INFO: Process project properties (done) | time=3ms
09:36:52.283 INFO: Project key: sample-project
09:36:52.283 INFO: Base dir: /Users/brad_pitt/Work/sample-project
09:36:52.283 INFO: Working dir: /Users/brad_pitt/Work/sample-project/.scannerwork
09:36:52.283 DEBUG: Project global encoding: UTF-8, default locale: fr_FR
09:36:52.288 INFO: Load project settings for component key: 'sample-project'
09:36:52.360 DEBUG: GET 200 https://sonar.custom.address/api/settings/values.protobuf?component=sample-project | time=72ms
09:36:52.361 INFO: Load project settings for component key: 'sample-project' (done) | time=73ms
09:36:52.373 INFO: Load project branches
09:36:52.429 DEBUG: GET 200 https://sonar.custom.address/api/project_branches/list?project=sample-project | time=56ms
09:36:52.437 INFO: Load project branches (done) | time=64ms
09:36:52.438 INFO: Load branch configuration
09:36:52.439 INFO: Load branch configuration (done) | time=1ms
09:36:52.445 DEBUG: Creating module hierarchy
09:36:52.445 DEBUG:   Init module 'Sample-project'
09:36:52.446 DEBUG:     Base dir: /Users/brad_pitt/Work/sample-project
09:36:52.446 DEBUG:     Working dir: /Users/brad_pitt/Work/sample-project/.scannerwork
09:36:52.446 DEBUG:     Module global encoding: UTF-8, default locale: fr_FR
09:36:52.452 INFO: Load quality profiles
09:36:52.543 DEBUG: GET 200 https://sonar.custom.address/api/qualityprofiles/search.protobuf?project=sample-project | time=91ms
09:36:52.555 INFO: Load quality profiles (done) | time=103ms
09:36:52.580 INFO: Load active rules
09:36:52.659 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AYR6vkIT2wu2VhL-Ouia&ps=500&p=1 | time=79ms
09:36:52.777 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXX_SNui4DM0DCSq9C5S&ps=500&p=1 | time=75ms
09:36:52.854 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AWq6WzrXK2wUtHRJedBZ&ps=500&p=1 | time=74ms
09:36:52.927 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXX_SNyO4DM0DCSq9C5r&ps=500&p=1 | time=72ms
09:36:53.286 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AWXJnxdpcPT-furQJq5w&ps=500&p=1 | time=358ms
09:36:53.693 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AWXJnxfZcPT-furQJq7o&ps=500&p=1 | time=295ms
09:36:53.889 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXX_fouyHI7HQ-NCGiyD&ps=500&p=1 | time=92ms
09:36:53.987 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AYdGmb2r5apmzzZm8IVU&ps=500&p=1 | time=95ms
09:36:54.140 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXUw9_hXcedT5e4ijqIJ&ps=500&p=1 | time=151ms
09:36:54.294 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXfyFxZ9K0zNdq5urlHx&ps=500&p=1 | time=109ms
09:36:54.363 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=a34d0aa5-3711-445c-bd94-215db1881ce3&ps=500&p=1 | time=66ms
09:36:54.790 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AWXJnx-HcPT-furQJr37&ps=500&p=1 | time=427ms
09:36:55.091 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AWXJnx-HcPT-furQJr37&ps=500&p=2 | time=132ms
09:36:55.191 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AWXJnyBzcPT-furQJr9S&ps=500&p=1 | time=98ms
09:36:55.274 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AWXJnyDDcPT-furQJr-U&ps=500&p=1 | time=81ms
09:36:55.359 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AWXJnyEQcPT-furQJr_F&ps=500&p=1 | time=82ms
09:36:55.426 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AYADkSomLlCkgUXihBAy&ps=500&p=1 | time=67ms
09:36:55.500 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AYADkSo3LlCkgUXihBA2&ps=500&p=1 | time=74ms
09:36:55.650 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXUw-JOFcedT5e4ijqLd&ps=500&p=1 | time=149ms
09:36:55.765 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AYADkSwpLlCkgUXihBCm&ps=500&p=1 | time=80ms
09:36:55.861 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AWXJnyJicPT-furQJsD7&ps=500&p=1 | time=95ms
09:36:55.963 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXUw-JvjcedT5e4ijqNr&ps=500&p=1 | time=98ms
09:36:56.019 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AYADkS1ZLlCkgUXihBDC&ps=500&p=1 | time=51ms
09:36:56.456 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXUw-KF_cedT5e4ijqSg&ps=500&p=1 | time=437ms
09:36:56.741 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXUw-KhhcedT5e4ijqYz&ps=500&p=1 | time=201ms
09:36:56.855 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXX_SNyi4DM0DCSq9C6K&ps=500&p=1 | time=79ms
09:36:57.036 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AWXJnxZPcPT-furQJq0B&ps=500&p=1 | time=178ms
09:36:57.212 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXUw-K4WcedT5e4ijqbv&ps=500&p=1 | time=160ms
09:36:57.317 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXUw-LJkcedT5e4ijqe6&ps=500&p=1 | time=103ms
09:36:57.414 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXUw-LDwcedT5e4ijqd0&ps=500&p=1 | time=95ms
09:36:57.502 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXUw-K9UcedT5e4ijqcm&ps=500&p=1 | time=84ms
09:36:57.666 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AYdGn0qP5apmzzZm8IYD&ps=500&p=1 | time=162ms
09:36:57.755 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXX_SN-v4DM0DCSq9C8P&ps=500&p=1 | time=86ms
09:36:58.198 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AWXJnxhvcPT-furQJq_i&ps=500&p=1 | time=441ms
09:36:58.351 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXUw-MZ7cedT5e4ijqgV&ps=500&p=1 | time=104ms
09:36:58.606 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AWXJnyHscPT-furQJsBt&ps=500&p=1 | time=248ms
09:36:58.725 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AYADkTX5LlCkgUXihBKP&ps=500&p=1 | time=114ms
09:36:58.826 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AYqDOVivpe-B7NTKpXz9&ps=500&p=1 | time=97ms
09:36:58.916 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXUw-Mvj0Np95AiIfCO9&ps=500&p=1 | time=89ms
09:36:59.222 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AXUw-MyN0Np95AiIfCSV&ps=500&p=1 | time=299ms
09:36:59.733 DEBUG: GET 200 https://sonar.custom.address/api/rules/list.protobuf?qprofile=AWXJnyLZcPT-furQJsFs&ps=500&p=1 | time=432ms
09:36:59.824 INFO: Load active rules (done) | time=7244ms
09:36:59.827 INFO: Load analysis cache
09:37:00.347 DEBUG: GET 200 https://sonar.custom.address/api/analysis_cache/get?project=sample-project | time=519ms
09:37:04.672 INFO: Load analysis cache | time=4845ms
09:37:04.740 DEBUG: GET 200 https://sonar.custom.address/api/languages/list | time=46ms
09:37:04.758 DEBUG: Declared patterns of language Kubernetes were converted to sonar.lang.patterns.kubernetes : 
09:37:04.759 DEBUG: Declared patterns of language CSS were converted to sonar.lang.patterns.css : **/*.css,**/*.less,**/*.scss,**/*.sass
09:37:04.759 DEBUG: Declared patterns of language Scala were converted to sonar.lang.patterns.scala : **/*.scala
09:37:04.759 DEBUG: Declared patterns of language JSP were converted to sonar.lang.patterns.jsp : **/*.jsp,**/*.jspf,**/*.jspx
09:37:04.759 DEBUG: Declared patterns of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.cjs,**/*.mjs,**/*.vue
09:37:04.759 DEBUG: Declared patterns of language Python were converted to sonar.lang.patterns.py : **/*.py
09:37:04.759 DEBUG: Declared patterns of language Apex were converted to sonar.lang.patterns.apex : **/*.cls,**/*.trigger
09:37:04.759 DEBUG: Declared patterns of language Docker were converted to sonar.lang.patterns.docker : **/Dockerfile,**/*.dockerfile
09:37:04.759 DEBUG: Declared patterns of language PL/SQL were converted to sonar.lang.patterns.plsql : **/*.sql,**/*.pks,**/*.pkb
09:37:04.760 DEBUG: Declared patterns of language Dart were converted to sonar.lang.patterns.dart : **/*.dart
09:37:04.760 DEBUG: Declared patterns of language JCL were converted to sonar.lang.patterns.jcl : **/*.jcl
09:37:04.760 DEBUG: Declared patterns of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
09:37:04.760 DEBUG: Declared patterns of language HTML were converted to sonar.lang.patterns.web : **/*.html,**/*.xhtml,**/*.cshtml,**/*.vbhtml,**/*.aspx,**/*.ascx,**/*.rhtml,**/*.erb,**/*.shtm,**/*.shtml,**/*.cmp,**/*.twig
09:37:04.760 DEBUG: Declared patterns of language Flex were converted to sonar.lang.patterns.flex : **/*.as
09:37:04.760 DEBUG: Declared patterns of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl,**/*.config
09:37:04.760 DEBUG: Declared patterns of language JSON were converted to sonar.lang.patterns.json : **/*.json
09:37:04.761 DEBUG: Declared patterns of language Text were converted to sonar.lang.patterns.text : 
09:37:04.761 DEBUG: Declared patterns of language VB.NET were converted to sonar.lang.patterns.vbnet : **/*.vb
09:37:04.761 DEBUG: Declared patterns of language CloudFormation were converted to sonar.lang.patterns.cloudformation : 
09:37:04.761 DEBUG: Declared patterns of language Groovy were converted to sonar.lang.patterns.grvy : 
09:37:04.761 DEBUG: Declared patterns of language Swift were converted to sonar.lang.patterns.swift : **/*.swift
09:37:04.761 DEBUG: Declared patterns of language YAML were converted to sonar.lang.patterns.yaml : **/*.yaml,**/*.yml
09:37:04.761 DEBUG: Declared patterns of language C++ were converted to sonar.lang.patterns.cpp : **/*.cc,**/*.cpp,**/*.cxx,**/*.c++,**/*.hh,**/*.hpp,**/*.hxx,**/*.h++,**/*.ipp
09:37:04.761 DEBUG: Declared patterns of language C were converted to sonar.lang.patterns.c : **/*.c,**/*.h
09:37:04.761 DEBUG: Declared patterns of language Go were converted to sonar.lang.patterns.go : **/*.go
09:37:04.761 DEBUG: Declared patterns of language Kotlin were converted to sonar.lang.patterns.kotlin : **/*.kt,**/*.kts
09:37:04.761 DEBUG: Declared patterns of language RPG were converted to sonar.lang.patterns.rpg : **/*.rpg,**/*.rpgle,**/*.sqlrpgle,**/*.rpg,**/*.rpgle,**/*.sqlrpgle
09:37:04.761 DEBUG: Declared patterns of language PL/I were converted to sonar.lang.patterns.pli : **/*.pli
09:37:04.761 DEBUG: Declared patterns of language T-SQL were converted to sonar.lang.patterns.tsql : **/*.tsql
09:37:04.762 DEBUG: Declared patterns of language Vb were converted to sonar.lang.patterns.vb : **/*.bas,**/*.frm,**/*.ctl
09:37:04.762 DEBUG: Declared patterns of language Secrets were converted to sonar.lang.patterns.secrets : 
09:37:04.762 DEBUG: Declared patterns of language Ruby were converted to sonar.lang.patterns.ruby : **/*.rb
09:37:04.762 DEBUG: Declared patterns of language C# were converted to sonar.lang.patterns.cs : **/*.cs,**/*.razor
09:37:04.762 DEBUG: Declared patterns of language COBOL were converted to sonar.lang.patterns.cobol : 
09:37:04.762 DEBUG: Declared patterns of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
09:37:04.762 DEBUG: Declared patterns of language Terraform were converted to sonar.lang.patterns.terraform : **/*.tf
09:37:04.762 DEBUG: Declared patterns of language AzureResourceManager were converted to sonar.lang.patterns.azureresourcemanager : **/*.bicep
09:37:04.762 DEBUG: Declared patterns of language ABAP were converted to sonar.lang.patterns.abap : **/*.abap,**/*.ab4,**/*.flow,**/*.asprog
09:37:04.762 DEBUG: Declared patterns of language Objective-C were converted to sonar.lang.patterns.objc : **/*.m
09:37:04.762 DEBUG: Declared patterns of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx,**/*.cts,**/*.mts
09:37:04.772 INFO: Preprocessing files...
09:37:04.791 DEBUG: loading config FileBasedConfig[/Users/brad_pitt/.config/jgit/config]
09:37:04.792 DEBUG: readpipe [/opt/homebrew/bin/git, --version],/opt/homebrew/bin
09:37:04.808 DEBUG: readpipe may return 'git version 2.43.0'
09:37:04.808 DEBUG: remaining output:

09:37:04.809 DEBUG: readpipe [/opt/homebrew/bin/git, config, --system, --show-origin, --list, -z],/opt/homebrew/bin
09:37:04.823 DEBUG: readpipe may return 'file:/opt/homebrew/etc/gitconfigcredential.helper'
09:37:04.823 DEBUG: remaining output:

09:37:04.823 DEBUG: osxkeychain
09:37:04.823 DEBUG: loading config FileBasedConfig[/opt/homebrew/etc/gitconfig]
09:37:04.824 DEBUG: loading config FileBasedConfig[/Users/brad_pitt/.config/git/config]
09:37:04.824 DEBUG: loading config UserConfigFile[/Users/brad_pitt/.gitconfig]
09:37:05.122 DEBUG: 3781 non excluded files in this Git repository
09:37:05.143 DEBUG: File '/Users/brad_pitt/Work/sample-project/src/tools/environment-parameters/dist/tsconfig.tsbuildinfo' is excluded by the scm ignore settings.
09:37:05.143 DEBUG: File '/Users/brad_pitt/Work/sample-project/src/tools/environment-parameters/_types/tsconfig.emit.tsbuildinfo' is excluded by the scm ignore settings.
09:37:14.778 INFO: 
09:37:14.943 DEBUG: File '/Users/brad_pitt/Work/sample-project/src/tools/iac/dist/tsconfig.tsbuildinfo' is excluded by the scm ignore settings.
09:37:14.944 DEBUG: File '/Users/brad_pitt/Work/sample-project/src/tools/iac/_types/tsconfig.emit.tsbuildinfo' is excluded by the scm ignore settings.
09:37:24.784 INFO: 
09:37:34.784 INFO: 
09:37:44.785 INFO: 
09:37:54.790 INFO: 

Hi,

Is this the full, 4-day log?

 
Ann

No I don’t have the full 4 day log since my terminal didn’t saved enough lines.
But it was endlessly saying this →

09:37:24.784 INFO: 
09:37:34.784 INFO: 
09:37:44.785 INFO: 
09:37:54.790 INFO: 

Nothing more

Hi,

Are you running antivirus on the build agent? If so, can you disable it, or at least exempt the workspace directory, recursive?

Also, I notice a number of 3rd-party plugins in your plugin list. Could you uninstall them, at least temporarily, so we can eliminate them as variables?

 
Thx,
Ann

Just tried the sonar-scanner for npm on a smaller project and got a result in 37 minutes with 34 minutes of empty INFO : while the regular one installed with homebrew is still running (3 hours now)

Then it works and analyse quite fastly

1 Like

No antivirus installed.

I also tried on a brand new sonar installation (Without any third party plugin). No effects.
Also tried :
SONAR_SCANNER_JAVA_OPTS="-Xmx4g"
-Dsonar.javascript.node.maxspace=8192
-Dsonar.log.level=TRACE

Nothing helped

Hi,

That homebrew installation isn’t one we offer or support. I suggest sticking with one of our distros.

 
HTH,
Ann

1 Like

While it’s running I tried something else :

Cleaned the project to make sure there were no node_modules.
Scan took 5 minutes.

So I’m pretty sure that the problem is due to node_modules and/or symlinks inside them (since we use pnpm).

The weird thing is → I excluded them :

sonar.host.url=https://sonar.server.com/
sonar.projectKey=sample-project
sonar.projectName=sample-project

sonar.sources=packages
sonar.exclusions=**/dist/*,**/*.spec.ts,**/*.test.ts,**/_types/**/*,**/_mocks/**/*,**/node_modules/**/*,**/cdk.out/*,**/.pnpm/*,**/.scannerwork/*
sonar.source.exclusions=**/dist/*,**/*.spec.ts,**/*.test.ts,**/_types/**/*,**/_mocks/**/*,**/node_modules/**/*,**/cdk.out/*,**/.pnpm/*,**/.scannerwork/*

up :slight_smile:

Tried with this →

sonar.exclusions=**/node_modules/**,**/dist/**,**/_types/**,**/_mocks/**,**/cdk.out/**,**/.pnpm/**,**/.scannerwork/**,**/*.spec.ts,**/*.test.ts
sonar.typescript.tsconfigPaths=src/config/typescript/*.json,src/**/tsconfig.json

Total time: 15:07.161s

Way better → But still a bit slow :confused: