Environment
- SonarQube Version: Developer Edition - Version 9.9.2 (build 77730)
- Plugin Version:
org.sonarqube: 4.3.1.3277
Issue
The java:S113
rule (requirement for an empty line at the end of a file) is not being triggered at the merge request level in my project. When I create a merge request that includes changes to a Java class without an empty line at the end, SonarQube shows a green status, indicating no issues. However, once the merge request is pushed to the master branch, SonarQube fails due to this rule.
Goal
I am trying to ensure that the java:S113
rule is consistently applied at both the merge request and master branch levels.
Attempts
- I have confirmed that the rule
java:S113
is active in my SonarQube quality profile. - Reviewed SonarQube logs for any errors or warnings related to this rule (no significant findings).
- Checked the SonarQube configuration for any discrepancies between merge request and master branch settings.
- Recreated the project in sonarqube
- Introduced on purpose other issues on same file. These issues where caught as expected.
How is SonarQube deployed
- Docker using Kubernetes
Warnings
- Shallow clone detected during the analysis. Some files will miss SCM information. This will affect features like auto-assignment of issues. Please configure your build to disable shallow clone.
- Missing blame information for 1 file. This may lead to some features not working correctly. Please check the analysis logs and refer to the documentation.
- No devops platform configured. To report the Quality Gate status to a devops platform, please configure it in the project administration.