Toggling warnings about the same "issue"

Telling me to move brace down

and when I move it, then telling me to move brace up. :sweat_smile: :rofl: :joy:

Java code

private String changeFreq() {
	if (this.changeFreq == null) {
		return "";
	}
	return "\t\t<changefreq>" + this.changeFreq + "</changefreq>" + SitemapController.CRLF;
}

OS
Windows 10 Pro; Version 21H2; OS build 19044.1566; Windows Feature Experience Pack 120.2212.4170.0

Java
java version “17” 2021-09-14 LTS; Java™ SE Runtime Environment (build 17+35-LTS-2724); Java HotSpot™ 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)

IDE
Spring Tool Suite 4; Version: 4.13.1.RELEASE; Build Id: 202201311654; Lombok v1.18.22 “Envious Ferret”

SonarLint
SonarLint for Eclipse 7.2.1.42550 org.sonarlint.eclipse.feature.feature.group

Hi,

Thanks for this report & I’m glad you can laugh about it. :smiley:

By default only one of those rules is on: S1105, the one telling you to put it at the end of line 35. It sounds like you’ve edited your rule set - either locally in SonarLint or in SonarQube if you’re using connected mode - to enable the second rule.

Can you check? Because for your own sanity and that of your teammates, I’m sure you want to turn off the one that doesn’t apply for your team.

 
Ann