Hi,
- We are using SonarQube Version 9.9.4 (build 87374).
- Our project is configured with Reference branch set to develop for New Code
- Our Quality Gate is set to fail when issues are found with severity Major on New Code
We have the following code:
/*
* some documentation
* @param timeout - some timeout parameter
*/
public SomeProperties(
Duration timeout,
String schedule) {
this.timeout = timeout;
this.schedule = schedule;
}
The argument schedule
is added in a feature-branch. The other code is already present in the develop-branch. The developer has forgotten to add the argument to the javadoc. This triggers rule S1176.
The issue is detected in the feature-branch as a Major issue. However, the rule triggers on the javadoc. It seems as it is not recognized that the cause of this issue is due to the addition of the schedule
argument. Therefore, the quality gate does not fail. The quality gate does fail when we have merged the code to the develop-branch.
It would have been better when the issue was also seen as an issue on ‘New Code’.