Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/full-scan.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ This is free, runs on your machine, and gives you a dashboard of every code smel
docker run -d --name sonarqube -e SONAR\_ES\_BOOTSTRAP\_CHECKS\_DISABLE=true -p 9000:9000 sonarqube:latest
```

`Access: Once initialized, the dashboard is accessible at http://localhost:9000 using default credentials (admin/admin).`
Access: Once initialized, the dashboard is accessible at `http://localhost:9000` using default credentials (admin/admin).

`Persistent Data: For production-like local setups, it is advisable to use Docker Compose to link SonarQube with an external database (like PostgreSQL) and persistent volumes for data retention. `
Persistent Data: For production-like local setups, it is advisable to use Docker Compose to link SonarQube with an external database (like PostgreSQL) and persistent volumes for data retention.

```poershell
docker run -d --name sonarqube -p 9000:9000 sonarqube:community
Expand All @@ -33,11 +33,11 @@ sonar.javascript.lcov.reportPaths=web/coverage/lcov.info

The two localization files are excluded because they're generated.

5. Run the scanner. It needs no install because it runs through npx. The token is the `SONAR_TOKEN` environment variable (`${SONAR_TOKEN}`):
5. Run the scanner. It needs no install because it runs through npx. The token is the `env:SONAR_TOKEN` environment variable (`${env:SONAR_TOKEN}`):

```powershell
cd web; npm run test:coverage; cd .. \# optional: adds coverage data to the report
npx sonarqube-scanner "-Dsonar.host.url=http://localhost:9000" "-Dsonar.token=${SONAR_TOKEN}"
npx sonarqube-scanner "-Dsonar.host.url=http://localhost:9000" "-Dsonar.token=${env:SONAR_TOKEN}"
```

6. Look at the results under Issues, filtered by Type = Code Smell (newer versions call it "Maintainability"). You can sort by severity, rule or file.
Expand All @@ -53,5 +53,5 @@ I've updated [sonar-project.properties](vscode-webview://1vvl62agp8nmso4u3onassc
Run it again with:

```powershell
npx sonarqube-scanner "-Dsonar.host.url=http://localhost:9000" "-Dsonar.token=${SONAR_TOKEN}"
npx sonarqube-scanner "-Dsonar.host.url=http://localhost:9000" "-Dsonar.token=${env:SONAR_TOKEN}"
```
9 changes: 5 additions & 4 deletions env-config/wt-add.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ if exist "..\wt\%1" (
git worktree add "..\wt\%1" -b %1
if errorlevel 1 exit /b 1
)
cd "..\wt\%1"
cd /d "..\wt\%1"
call npm install
if errorlevel 1 exit /b 1
cd src
cd web
call npm install
if errorlevel 1 exit /b 1
cd ..\..
cd ..
call npm run stamp
if errorlevel 1 exit /b 1
if not exist env-config mkdir env-config
REM * does not match leading-dot names. .* copies .env.* and .auth0-variables.*.json.
xcopy /Y /Q "%REPO%\env-config\*" "env-config\" >nul
xcopy /Y /H /Q "%REPO%\env-config\.env*" "env-config\" >nul
xcopy /Y /H /Q "%REPO%\env-config\.*" "env-config\" >nul
call npm run devs
if errorlevel 1 exit /b 1
if exist "%REPO%\localization\bin" (
Expand Down
Loading