Skip to content

Initialize Sonarcloud for test coverage and code quality reports#218

Merged
nikomakela merged 3 commits into
mainfrom
HCRC-186-init-sonarcloud
Dec 9, 2025
Merged

Initialize Sonarcloud for test coverage and code quality reports#218
nikomakela merged 3 commits into
mainfrom
HCRC-186-init-sonarcloud

ci: use common github workflow configuration

17186b7
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Dec 9, 2025 in 1m 0s

Quality Gate failed

Failed conditions
4 Security Hotspots
28.4% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 280 in src/core/collection/Collection.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUky_WYN1kdkfSNF&open=AZr-GUky_WYN1kdkfSNF&pullRequest=218

Check warning on line 25 in src/core/pageModules/CardsModule/CardsModule.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUiJ_WYN1kdkfSMm&open=AZr-GUiJ_WYN1kdkfSMm&pullRequest=218

Check warning on line 297 in src/core/card/card.module.scss

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this commented out code.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUlO_WYN1kdkfSNQ&open=AZr-GUlO_WYN1kdkfSNQ&pullRequest=218

Check warning on line 297 in src/common/headlessService/utils.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Avoid using `instanceof` for type checking as it can lead to unreliable results.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUoK_WYN1kdkfSN1&open=AZr-GUoK_WYN1kdkfSN1&pullRequest=218

Check warning on line 29 in src/core/carousel/components/CarouselSliderPage.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "indexOf" or "includes" (available from ES2016) instead.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUet_WYN1kdkfSL9&open=AZr-GUet_WYN1kdkfSL9&pullRequest=218

Check warning on line 225 in src/core/archiveSearchPageContent/ArchiveSearchPageContent.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Mark the props of the component as read-only.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUl0_WYN1kdkfSNg&open=AZr-GUl0_WYN1kdkfSNg&pullRequest=218

Check warning on line 15 in src/core/pageContent/meta/PageMeta.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `String#replaceAll()` over `String#replace()`.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUgi_WYN1kdkfSMP&open=AZr-GUgi_WYN1kdkfSMP&pullRequest=218

Check warning on line 77 in src/core/configProvider/defaultConfig.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `globalThis` over `window`.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUeE_WYN1kdkfSLw&open=AZr-GUeE_WYN1kdkfSLw&pullRequest=218

Check warning on line 9 in src/core/configProvider/useApolloClientFromConfig.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use `new Error()` instead of `Error()`.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUd5_WYN1kdkfSLs&open=AZr-GUd5_WYN1kdkfSLs&pullRequest=218

Check warning on line 29 in src/core/configProvider/defaultConfig.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Take the required action to fix the issue indicated by this comment.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUeD_WYN1kdkfSLt&open=AZr-GUeD_WYN1kdkfSLt&pullRequest=218

Check warning on line 112 in src/core/link/Link.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Compare with `undefined` directly instead of using `typeof`.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUlp_WYN1kdkfSNd&open=AZr-GUlp_WYN1kdkfSNd&pullRequest=218

Check warning on line 64 in src/core/pageModules/pageModules.module.scss

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this commented out code.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUjV_WYN1kdkfSMx&open=AZr-GUjV_WYN1kdkfSMx&pullRequest=218

Check warning on line 86 in src/core/link/Link.stories.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Ambiguous spacing before next element img

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUlY_WYN1kdkfSNU&open=AZr-GUlY_WYN1kdkfSNU&pullRequest=218

Check warning on line 26 in src/core/pageContent/sidebarContent/SidebarContentCard.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Mark the props of the component as read-only.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUfl_WYN1kdkfSMJ&open=AZr-GUfl_WYN1kdkfSMJ&pullRequest=218

Check warning on line 30 in src/core/pageContent/sidebarContent/SidebarContent.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Mark the props of the component as read-only.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUf5_WYN1kdkfSMN&open=AZr-GUf5_WYN1kdkfSMN&pullRequest=218

Check warning on line 23 in src/core/utils/getChildrenByType.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUiB_WYN1kdkfSMj&open=AZr-GUiB_WYN1kdkfSMj&pullRequest=218

Check warning on line 44 in src/core/archiveSearchPage/ArchiveSearchPage.stories.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `globalThis` over `window`.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUl9_WYN1kdkfSNi&open=AZr-GUl9_WYN1kdkfSNi&pullRequest=218

Check warning on line 28 in src/core/pageContent/PageMainContent.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Mark the props of the component as read-only.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUgr_WYN1kdkfSMR&open=AZr-GUgr_WYN1kdkfSMR&pullRequest=218

Check warning on line 199 in src/core/navigation/Navigation.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Correct one of the identical sub-expressions on both sides of operator "&&"

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUhj_WYN1kdkfSMd&open=AZr-GUhj_WYN1kdkfSMd&pullRequest=218

Check failure on line 61 in src/common/components/htmlToReact/__tests__/HtmlToReact.tests.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest functions more than 4 levels deep.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUnh_WYN1kdkfSNx&open=AZr-GUnh_WYN1kdkfSNx&pullRequest=218

Check warning on line 21 in src/core/configProvider/ConfigProvider.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Mark the props of the component as read-only.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUdJ_WYN1kdkfSLp&open=AZr-GUdJ_WYN1kdkfSLp&pullRequest=218

Check warning on line 15 in src/core/carousel/utils/utils.ts

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract the assignment of "i" from this expression.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUfC_WYN1kdkfSMD&open=AZr-GUfC_WYN1kdkfSMD&pullRequest=218

Check warning on line 27 in src/core/linkBox/LinkBox.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUmf_WYN1kdkfSNm&open=AZr-GUmf_WYN1kdkfSNm&pullRequest=218

Check warning on line 197 in src/core/pageContent/PageContent.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not use nested template literals.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUhQ_WYN1kdkfSMX&open=AZr-GUhQ_WYN1kdkfSMX&pullRequest=218

Check warning on line 125 in src/core/navigation/Navigation.tsx

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `globalThis` over `window`.

See more on https://sonarcloud.io/project/issues?id=city-of-helsinki_react-helsinki-headless-cms&issues=AZr-GUhj_WYN1kdkfSMa&open=AZr-GUhj_WYN1kdkfSMa&pullRequest=218