Hello,
S1168 detects empty method/function blocks, but when writing a test you often write stubs, and you might be fine with having some methods of those stubs empty. This does not require a comment to explain, it’s normal for a test stub.
The added value of the rule in the Test scope seems minimal, while the amount of false positives raised is massive. Previously this rule was on Main scope only, which was perfectly fine. To lower the number of false positives in tests, the rule should at least detect stubs and other kinds of test-doubles and exclude them.
Language : Go (but this applies to most languages)
Environment : Sonarcloud
Reproducing : Just create a test with an empty function/method in it