
org.sonar.plugins.csharp.S3903.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonarlint-omnisharp-plugin Show documentation
Show all versions of sonarlint-omnisharp-plugin Show documentation
Code Analyzer based on Omnisharp
Why is this an issue?
Types are declared in namespaces in order to prevent name collisions and as a way to organize them into the object hierarchy. Types that are
defined outside any named namespace are in a global namespace that cannot be referenced in code.
Noncompliant code example
public class Foo // Noncompliant
{
}
public struct Bar // Noncompliant
{
}
Compliant solution
namespace SomeSpace
{
public class Foo
{
}
public struct Bar
{
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy