Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Rule T0037: Use .Test suffix namespace #9732

Open
pavel-mikula-sonarsource opened this issue Feb 13, 2025 · 0 comments
Open

New Rule T0037: Use .Test suffix namespace #9732

pavel-mikula-sonarsource opened this issue Feb 13, 2025 · 0 comments
Labels
Type: Styling Anything related to styling rules

Comments

@pavel-mikula-sonarsource
Copy link
Contributor

When there's a Test namespace based on project name with .Test in it, and follow up namespace Something, and there's a using importing the Something directly, raise an issue to use .Test suffix instead.

using SonarAnalyzer.Xxx.Something;

namespace SonarAnalyzser.Xxx.Test.Something // Noncompliant
namespace SonarAnalyzser.Xxx.Something.Test// Compliant, the using can be removed (we don't care in this rule)

We don't want to raise everywhere to reduce noise. For example :

namespace SonarAnalyzer.Enterprise.SymbolicExecution.Test.TestFramework; // This still makes sense as is
namespace SonarAnalyzer.Test.Rules; // This is acceptable
@pavel-mikula-sonarsource pavel-mikula-sonarsource added the Type: Styling Anything related to styling rules label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Styling Anything related to styling rules
Projects
None yet
Development

No branches or pull requests

1 participant