koliveira15 / nx-sonarqube

A Nx plugin that scans projects using SonarQube / SonarCloud.
MIT License
51 stars 21 forks source link

Replace all underscores of environment variables #31

Closed brayunm closed 1 year ago

brayunm commented 1 year ago

TLDR A string.replace will only replace the first hit, using a global regex it replaces all hits.

image

Description Hi, When working with this library and looking at the README I saw that the process environment variables can be used. In the docs it says SONAR_LOG_LEVEL will be transformed to sonar.log.level, right now it seems to be transformed to sonar.log_level. This seems to be due to a string.replace using a string to find the underscore(s) which results in only the first underscore to be replaced

nx-cloud[bot] commented 1 year ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 7ef1f3164efd2e0188ec0cf1fc13d96246a5899f. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


🟥 Failed Commands
nx affected --target=e2e --parallel=1
✅ Successfully ran 4 targets - [`nx affected --target=lint --parallel=3`](https://cloud.nx.app/runs/NwKwmmy3TU) - [`nx affected --target=build --parallel=3`](https://cloud.nx.app/runs/df69FD8yD3) - [`nx affected --target=test --parallel=3 --ci`](https://cloud.nx.app/runs/wj7l1INe1V) - [`nx-cloud record -- npx nx workspace-lint`](https://cloud.nx.app/runs/190NKu3b1y)

Sent with 💌 from NxCloud.