From fff4b3bfe4115c99e3b1b3714cba4e736a155be9 Mon Sep 17 00:00:00 2001 From: NishantRajputRN Date: Tue, 12 May 2026 15:53:39 +0530 Subject: [PATCH] test sonar --- .gitea/workflows/azure-pipelines.yml | 9 ++++++--- App.js | 3 ++- sonar-project.properties | 5 ++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/azure-pipelines.yml b/.gitea/workflows/azure-pipelines.yml index 2f3b9e5..79721d7 100644 --- a/.gitea/workflows/azure-pipelines.yml +++ b/.gitea/workflows/azure-pipelines.yml @@ -12,6 +12,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 0 # ---------------- NODE ---------------- - name: Setup Node @@ -24,11 +26,12 @@ jobs: run: npm ci # ---------------- SONARQUBE ---------------- - # Set repository secret SONAR_TOKEN (User token from SonarQube). Do not commit tokens to git. + # In Gitea: Repository → Settings → Secrets and variables → add secret SONAR_TOKEN + # (SonarQube user token). Name must be exactly SONAR_TOKEN — not the token value as the name. - name: SonarQube Scan - uses: SonarSource/sonarqube-scan-action@v4 + uses: SonarSource/sonarqube-scan-action@v6 env: - SONAR_TOKEN: ${{ secrets.sqp_b87b0e90564ffc64e9059611d458d777d5148b8b }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: http://98.70.31.53:9000 # ---------------- JAVA ---------------- diff --git a/App.js b/App.js index 1568ce4..b28a4ac 100644 --- a/App.js +++ b/App.js @@ -1,3 +1,4 @@ console.log("trest") -console.log("test2") \ No newline at end of file +console.log("test2") +console.log("test3") \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties index a991254..0cec130 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,3 +1,6 @@ +# Auth: use SONAR_TOKEN (env) or -Dsonar.token=... — never commit tokens or sonar.login here. sonar.projectKey=novaCodeTest sonar.sources=. -sonar.exclusions=**/node_modules/**,**/android/build/**,**/ios/Pods/**,**/ios/build/** +sonar.host.url=http://98.70.31.53:9000 +# From CLI intent: skip Java/Kotlin and the Android tree; **/ forms cover the repo (not only repo root). +sonar.exclusions=**/*.java,**/*.kt,**/android/**,**/node_modules/**,**/ios/Pods/**,**/ios/build/**