Hello,
We are using SonarQube Enterprise v10.8 (100206) in a Kubernetes environment.
We want to analyze COBOL sources containing generated parts that we wish to exclude from these analyses. The sections of code to be excluded are marked according to the regular expressions defined below.
We are using the following type of sonar-project.properties file:
# Identifiants du projet dans Sonar
sonar.projectKey=dsim-entp:pege:tesae:k19
sonar.projectName=K19
sonar.projectVersion=2026.03.17-SNAPSHOT
# Emplacement des composants
sonar.sources=.
sonar.cobol.file.suffixes=cbl
# Encoding of the source code
sonar.sourceEncoding=iso-8859-1
# Langage
sonar.languages=COBOL
# Calcul du taux de couverture des TU
sonar.tests=./test/
sonar.test.inclusions=**/*.txt
sonar.coverageReportPaths=coverage_sonarqube.xml
sonar.testExecutionReportPaths=testrun_sonarqube.xml
sonar.issue.ignore.block=pregene
sonar.issue.ignore.block.pregene.beginBlockRegexp=\\s{6}\\* DEBUT GENERE
sonar.issue.ignore.block.pregene.endBlockRegexp=\\s{6}\\* FIN GENERE
Our COBOL sources are organized this way: they contain a sequence of blocks to be ignored or analyzed
* DEBUT GENERE
...
first COBOL block to ignore
...
* FIN GENERE
...
Some COBOL code to analyze
...
* DEBUT GENERE
...
second COBOL block to ignore
...
* FIN GENERE
...
Other COBOL code to analyze
...
and so on
...
The issue we are facing is that only the first ignore block is really ignored. All following ignore blocks are analyzed instead of being ignored!
Most of our COBOL sources are made of multiple ignore blocks.
Can you tell us how to fix that and make Sonar ignores all ignore blocks not only the first ones, please?