Sharing some naming conventions is a key point to make it possible for a team to efficiently collaborate. This rule allows to check that all namespace names match a provided regular expression.
With default regular expression ^[A-Z]|[A-Z]+[A-Za-z0-9]*[A-Za-z0-9]+$:
namespace eval foo { ; # Noncompliant
...
namespace eval bar { ; # Noncompliant
...
}
}
With default regular expression ^[A-Z]|[A-Z]+[A-Za-z0-9]*[A-Za-z0-9]+$:
namespace eval Foo {
...
namespace eval Bar {
...
}
}
The rule is not checked if the name of the namespace is dynamic:
namespace eval $my_variable {
...
}