👋🏽 Welcome to CodeScene Community

A place to connect, share, and learn with fellow devs and CodeScene users.

And that’s not all…

💡 Got an idea? Post a feature request.

🐞 Found a bug? Let us know.

🎓 Not certified yet? Start your Academy journey today!

📦 On-Prem customer? Subscribe and be the first to know when a new version drops.


🤖 Try out Eve, CodeScene's AI Chatbot

We were founded by Adam and now our latest AI recruit Eve is ready to assist — Just click the button on the bottom right to launch her ↘️

Answered

Disable Code Duplication smells in tests

I feel fine with having a bit more code duplication in my tests than in other code. But I can’t seem to disable the warnings. I’ve tried both with comments and a config file. My code is C#. I’ve added the hint as this: ```cs [Fact] // @codescene(disable:"Code Duplication") public async Task CloseAccount_Should_FailOnWrongPassword() { } ``` But the method is still marked as Code Duplication. I’ve also created a .codescene/code-health-rules.json that looks like this: ```json { "usage": "Code Health", "rule_sets": [ { "matching_content_path": "Carehood.Api.IntegrationTests/**", "rules": [ { "name": "Code Duplication", "weight": 0.0 } ] } ] } ``` I still see the warning in both VS Code and Rider.

IDE Extensions

5 months ago

3