mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
WarnOnImplicitlySetGlobalVar(): warn only on sins inside actual DSL code
(cherry picked from commit b4e3736e31d8bc70ac75ca1522db9c0f28f4fa4d)
This commit is contained in:
parent
cd71b97249
commit
d7d54e53f7
@ -560,7 +560,7 @@ void WarnOnImplicitlySetGlobalVar(const std::unique_ptr<Expression>& setLhs, con
|
||||
if (var && setLhsParent.IsObject()) {
|
||||
auto ns (dynamic_pointer_cast<Namespace>(setLhsParent.Get<Object::Ptr>()));
|
||||
|
||||
if (ns && ns == ScriptGlobal::GetGlobals()) {
|
||||
if (ns && ns == ScriptGlobal::GetGlobals() && debug.Path.GetLength()) {
|
||||
const char *opStr = nullptr;
|
||||
|
||||
switch (setOp) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user