From 486facac1ddb589b34f83b2382cdab44ca2b31dd Mon Sep 17 00:00:00 2001 From: Angus Bayley Date: Tue, 10 Dec 2024 12:06:55 +0000 Subject: [PATCH 1/7] ci: migrate to sonarcloud --- .github/workflows/sonar.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 1591639c1379..62ec70ede9d6 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -58,7 +58,7 @@ jobs: run: | cat apps/ledger-live-desktop/coverage/lld-sonar-executionTests-report.xml > ./lld-sonar-executionTests-report.xml cat apps/ledger-live-mobile/coverage/llm-sonar-executionTests-report.xml > ./llm-sonar-executionTests-report.xml - - uses: sonarsource/sonarqube-scan-action@master + - name: SonarQube Scan + uses: sonarsource/sonarcloud-github-action@master env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} \ No newline at end of file + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file From 709689d4f154fca65566073d3b916b3951cd7951 Mon Sep 17 00:00:00 2001 From: Angus Bayley Date: Tue, 10 Dec 2024 12:39:18 +0000 Subject: [PATCH 2/7] ci: add sonar.organization to sonar-project.properties --- sonar-project.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 757780edafe9..333fb344f14a 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -5,4 +5,5 @@ sonar.sources=apps,libs sonar.exclusions=.pnpm/**,**/node_modules/**,**/*.java,**/.turbo,**/.webpack/**/*,**/jest.config.js,**/jest.config.ts,**/jest-setup.js,**/jestSetup.js,**/jest-global-setup.js,**/please-add-coverage.test.ts,**/jest.integ.config.js,**/deeplinks-test-page.html,**/babel.config.js,**/detox.config.js,**/metro.config.js,apps/ledger-live-mobile/react-native.config,**/fileMock.js,**/jest.polyfills.js,apps/ledger-live-desktop/tests/**,apps/ledger-live-mobile/tests/**,apps/ledger-live-desktop/scripts/**,**/__mocks__/**,**/__tests__/**,**/e2e/**,**/types.ts,**/*.esbuild.js,**/*.mjs,**/constants.ts,**/enums.ts,apps/ledger-live-desktop/tools/** sonar.javascript.lcov.reportPaths=lcov.info sonar.testExecutionReportPaths=lld-sonar-executionTests-report.xml,llm-sonar-executionTests-report.xml -sonar.typescript.tsconfigPaths=tsconfig.base.json,**/tsconfig.json \ No newline at end of file +sonar.typescript.tsconfigPaths=tsconfig.base.json,**/tsconfig.json +sonar.organization=ledger \ No newline at end of file From 5d222b608d225eb90a2e66b7fadad4b3049328bf Mon Sep 17 00:00:00 2001 From: Angus Bayley Date: Tue, 10 Dec 2024 13:56:36 +0000 Subject: [PATCH 3/7] ci: increase memory limit for process --- sonar-project.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 333fb344f14a..9ac5c51aa688 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -6,4 +6,5 @@ sonar.exclusions=.pnpm/**,**/node_modules/**,**/*.java,**/.turbo,**/.webpack/**/ sonar.javascript.lcov.reportPaths=lcov.info sonar.testExecutionReportPaths=lld-sonar-executionTests-report.xml,llm-sonar-executionTests-report.xml sonar.typescript.tsconfigPaths=tsconfig.base.json,**/tsconfig.json -sonar.organization=ledger \ No newline at end of file +sonar.organization=ledger +sonar.javascript.node.maxspace=8192 \ No newline at end of file From 4f85d1fed84f7b4168a67ac2767f59cd556effee Mon Sep 17 00:00:00 2001 From: Angus Bayley Date: Tue, 10 Dec 2024 14:59:38 +0000 Subject: [PATCH 4/7] ci: ignore C + C variant files --- sonar-project.properties | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 9ac5c51aa688..fe8d80273eea 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -7,4 +7,7 @@ sonar.javascript.lcov.reportPaths=lcov.info sonar.testExecutionReportPaths=lld-sonar-executionTests-report.xml,llm-sonar-executionTests-report.xml sonar.typescript.tsconfigPaths=tsconfig.base.json,**/tsconfig.json sonar.organization=ledger -sonar.javascript.node.maxspace=8192 \ No newline at end of file +sonar.javascript.node.maxspace=8192 +sonar.c.file.suffixes=- +sonar.cpp.file.suffixes=- +sonar.objc.file.suffixes=- \ No newline at end of file From c1cf873cfb65b203475b985280b9986e38fda46e Mon Sep 17 00:00:00 2001 From: Angus Bayley Date: Tue, 10 Dec 2024 15:44:00 +0000 Subject: [PATCH 5/7] ci: fix project key --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index fe8d80273eea..5ae832f136d0 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,4 @@ -sonar.projectKey=LedgerHQ_ledger-live_AZKKhf387xkLuPYwRra5 +sonar.projectKey=LedgerHQ_ledger-live sonar.projectName=ledger-live sonar.sourceEncoding=UTF-8 sonar.sources=apps,libs From 3ef46a6f63a152c51830277a44b3a20696ce469f Mon Sep 17 00:00:00 2001 From: Angus Bayley Date: Tue, 10 Dec 2024 17:18:18 +0000 Subject: [PATCH 6/7] ci: configure tsconfig paths --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 5ae832f136d0..0823197081b3 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -5,7 +5,7 @@ sonar.sources=apps,libs sonar.exclusions=.pnpm/**,**/node_modules/**,**/*.java,**/.turbo,**/.webpack/**/*,**/jest.config.js,**/jest.config.ts,**/jest-setup.js,**/jestSetup.js,**/jest-global-setup.js,**/please-add-coverage.test.ts,**/jest.integ.config.js,**/deeplinks-test-page.html,**/babel.config.js,**/detox.config.js,**/metro.config.js,apps/ledger-live-mobile/react-native.config,**/fileMock.js,**/jest.polyfills.js,apps/ledger-live-desktop/tests/**,apps/ledger-live-mobile/tests/**,apps/ledger-live-desktop/scripts/**,**/__mocks__/**,**/__tests__/**,**/e2e/**,**/types.ts,**/*.esbuild.js,**/*.mjs,**/constants.ts,**/enums.ts,apps/ledger-live-desktop/tools/** sonar.javascript.lcov.reportPaths=lcov.info sonar.testExecutionReportPaths=lld-sonar-executionTests-report.xml,llm-sonar-executionTests-report.xml -sonar.typescript.tsconfigPaths=tsconfig.base.json,**/tsconfig.json +sonar.typescript.tsconfigPaths=tsconfig.base.json,apps/**/tsconfig.json sonar.organization=ledger sonar.javascript.node.maxspace=8192 sonar.c.file.suffixes=- From 1beac31aa39dd4448f24f4179e7dab9d8b36f2e7 Mon Sep 17 00:00:00 2001 From: Angus Bayley Date: Wed, 11 Dec 2024 09:50:08 +0000 Subject: [PATCH 7/7] ci: increase memory limit for node again --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 0823197081b3..e01db1edb50c 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -7,7 +7,7 @@ sonar.javascript.lcov.reportPaths=lcov.info sonar.testExecutionReportPaths=lld-sonar-executionTests-report.xml,llm-sonar-executionTests-report.xml sonar.typescript.tsconfigPaths=tsconfig.base.json,apps/**/tsconfig.json sonar.organization=ledger -sonar.javascript.node.maxspace=8192 +sonar.javascript.node.maxspace=16384 sonar.c.file.suffixes=- sonar.cpp.file.suffixes=- sonar.objc.file.suffixes=- \ No newline at end of file