Skip to content

Commit 0d48fa0

Browse files
committed
lint.py: Explained faulty function defs list
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
1 parent 414d56d commit 0d48fa0

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/cfengine_cli/lint.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@
5252
}
5353
PROMISE_BLOCK_ATTRIBUTES = ("path", "interpreter")
5454
KNOWN_FAULTY_FUNCTION_DEFS = {"regex_replace", "peers"}
55-
# Functions that have known overrides in masterfiles, e.g body with the name regex_replace, conflicting with the function
55+
# Generally, we don't want to allow creating bodies / bundles with the same
56+
# name as a built in function, as it can make things more confusing
57+
# (harder to read / understand policy and look up definitions).
58+
#
59+
# There are a couple of pre-existing cases that we need to preserve for backwards
60+
# compatibility - bodies / bundles defined in masterfiles which have the same
61+
# name as a built in function.
5662

5763

5864
@dataclass

0 commit comments

Comments
 (0)