Repository: jhipster/jhipster-lite
Pull request #10475 (2024-08-01 19:57:55)

Sonar: clean exlusions files


Patch:
diff --git a/src/main/resources/generator/server/sonar/sonar-fullstack-project.properties.mustache b/src/main/resources/generator/server/sonar/sonar-fullstack-project.properties.mustache
index 24ba1a9d1..760f2a188 100644
--- a/src/main/resources/generator/server/sonar/sonar-fullstack-project.properties.mustache
+++ b/src/main/resources/generator/server/sonar/sonar-fullstack-project.properties.mustache
@@ -17,7 +17,7 @@ sonar.testExecutionReportPaths={{projectBuildDirectory}}/test-results/TESTS-resu
 sonar.javascript.lcov.reportPaths={{projectBuildDirectory}}/test-results/lcov.info
 
 sonar.sourceEncoding=UTF-8
-sonar.exclusions=src/main/webapp/main.ts, src/main/webapp/app/main.ts, src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, {{projectBuildDirectory}}/classes/static/**/*.*, src/main/webapp/app/index.tsx, src/main/webapp/routes/+page.svelte
+sonar.exclusions=src/main/webapp/main.ts, src/main/webapp/app/main.ts, src/main/webapp/content/**/*.*, {{projectBuildDirectory}}/classes/static/**/*.*, src/main/webapp/app/index.tsx, src/main/webapp/routes/+page.svelte
 
 sonar.issue.ignore.multicriteria=S117,S119,S125,S3437,S4502,S4684,S4032,S5778,S1133,S6206,S6437,S6564,UndocumentedApi
 
diff --git a/src/main/resources/generator/server/sonar/sonar-project.properties.mustache b/src/main/resources/generator/server/sonar/sonar-project.properties.mustache
index 2b4a777bc..361aa67ab 100644
--- a/src/main/resources/generator/server/sonar/sonar-project.properties.mustache
+++ b/src/main/resources/generator/server/sonar/sonar-project.properties.mustache
@@ -14,7 +14,7 @@ sonar.java.codeCoveragePlugin=jacoco
 sonar.junit.reportPaths={{projectBuildDirectory}}/surefire-reports,{{projectBuildDirectory}}/failsafe-reports
 
 sonar.sourceEncoding=UTF-8
-sonar.exclusions=src/main/webapp/main.ts, src/main/webapp/app/main.ts, src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, {{projectBuildDirectory}}/classes/static/**/*.*, src/main/webapp/app/index.tsx
+sonar.exclusions=src/main/webapp/main.ts, src/main/webapp/app/main.ts, src/main/webapp/content/**/*.*, {{projectBuildDirectory}}/classes/static/**/*.*, src/main/webapp/app/index.tsx
 
 sonar.issue.ignore.multicriteria=S117,S119,S125,S3437,S4502,S4684,S4032,S5778,S1133,S6206,S6548,S6437,S6471,UndocumentedApi
 


Test patch:
diff --git a/src/test/java/tech/jhipster/lite/generator/server/sonarqube/domain/SonarQubeModulesFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/server/sonarqube/domain/SonarQubeModulesFactoryTest.java
index 3ae8bb1fe..19f5dd709 100644
--- a/src/test/java/tech/jhipster/lite/generator/server/sonarqube/domain/SonarQubeModulesFactoryTest.java
+++ b/src/test/java/tech/jhipster/lite/generator/server/sonarqube/domain/SonarQubeModulesFactoryTest.java
@@ -41,7 +41,7 @@ class SonarQubeModulesFactoryTest {
         .containing("sonar.coverage.jacoco.xmlReportPaths=target/jacoco/jacoco.xml")
         .containing("sonar.junit.reportPaths=target/surefire-reports,target/failsafe-reports")
         .containing(
-          "sonar.exclusions=src/main/webapp/main.ts, src/main/webapp/app/main.ts, src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, target/classes/static/**/*.*, src/main/webapp/app/index.tsx"
+          "sonar.exclusions=src/main/webapp/main.ts, src/main/webapp/app/main.ts, src/main/webapp/content/**/*.*, target/classes/static/**/*.*, src/main/webapp/app/index.tsx"
         )
         .notContaining("sonar.testExecutionReportPaths=target/test-results/TESTS-results-sonar.xml");
     }
@@ -55,7 +55,7 @@ class SonarQubeModulesFactoryTest {
       assertCommonModule(module)
         .hasFile("sonar-project.properties")
         .containing(
-          "sonar.exclusions=src/main/webapp/main.ts, src/main/webapp/app/main.ts, src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, target/classes/static/**/*.*, src/main/webapp/app/index.tsx, src/main/webapp/routes/+page.svelte"
+          "sonar.exclusions=src/main/webapp/main.ts, src/main/webapp/app/main.ts, src/main/webapp/content/**/*.*, target/classes/static/**/*.*, src/main/webapp/app/index.tsx, src/main/webapp/routes/+page.svelte"
         )
         .containing("sonar.testExecutionReportPaths=target/test-results/TESTS-results-sonar.xml")
         .containing("sonar.javascript.lcov.reportPaths=target/test-results/lcov.info");
@@ -132,7 +132,7 @@ class SonarQubeModulesFactoryTest {
       assertCommonModule(module)
         .hasFile("sonar-project.properties")
         .containing(
-          "sonar.exclusions=src/main/webapp/main.ts, src/main/webapp/app/main.ts, src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, build/classes/static/**/*.*, src/main/webapp/app/index.tsx"
+          "sonar.exclusions=src/main/webapp/main.ts, src/main/webapp/app/main.ts, src/main/webapp/content/**/*.*, build/classes/static/**/*.*, src/main/webapp/app/index.tsx"
         )
         .notContaining("sonar.testExecutionReportPaths=build/test-results/TESTS-results-sonar.xml");
     }
@@ -146,7 +146,7 @@ class SonarQubeModulesFactoryTest {
       assertCommonModule(module)
         .hasFile("sonar-project.properties")
         .containing(
-          "sonar.exclusions=src/main/webapp/main.ts, src/main/webapp/app/main.ts, src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, build/classes/static/**/*.*, src/main/webapp/app/index.tsx, src/main/webapp/routes/+page.svelte"
+          "sonar.exclusions=src/main/webapp/main.ts, src/main/webapp/app/main.ts, src/main/webapp/content/**/*.*, build/classes/static/**/*.*, src/main/webapp/app/index.tsx, src/main/webapp/routes/+page.svelte"
         )
         .containing("sonar.testExecutionReportPaths=build/test-results/TESTS-results-sonar.xml")
         .containing("sonar.javascript.lcov.reportPaths=build/test-results/lcov.info");