From 0d48fa015fee62601c7464cc350b678529527a3a Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Fri, 24 Apr 2026 17:15:03 +0200 Subject: [PATCH] lint.py: Explained faulty function defs list Signed-off-by: Ole Herman Schumacher Elgesem --- src/cfengine_cli/lint.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cfengine_cli/lint.py b/src/cfengine_cli/lint.py index 42395cd..7bbe4d0 100644 --- a/src/cfengine_cli/lint.py +++ b/src/cfengine_cli/lint.py @@ -52,7 +52,13 @@ } PROMISE_BLOCK_ATTRIBUTES = ("path", "interpreter") KNOWN_FAULTY_FUNCTION_DEFS = {"regex_replace", "peers"} -# Functions that have known overrides in masterfiles, e.g body with the name regex_replace, conflicting with the function +# Generally, we don't want to allow creating bodies / bundles with the same +# name as a built in function, as it can make things more confusing +# (harder to read / understand policy and look up definitions). +# +# There are a couple of pre-existing cases that we need to preserve for backwards +# compatibility - bodies / bundles defined in masterfiles which have the same +# name as a built in function. @dataclass