C# Analysis - spotting unused using directives

Been using SonarCloud for a few weeks and think it’s great - reducing time it takes to review PRs and improving our test code coverage :slight_smile:

Just wondered if there was an easy way to spot using directives in C# (.net core) that are not being used, it’s a constant thing we pick up in PRs, and sounds like a good fit for SonarCloud to register them as code smells - although it doesn’t seem to do it at the moment?


Hi @jasonpdoherty,

Here is the link to the ticket for this new rule: https://github.com/SonarSource/sonar-dotnet/issues/2210


Brilliant thanks - any ideas how can implement it? - guessing a new quality profile?

Any links to any guides would be great!

We will handle the implementation and the rule will be available under the ID S1128 but I cannot commit on any ETA.