From b82a951c6b034454b2689c7c727cd25d5235291b Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Fri, 2 Oct 2026 15:11:29 +0300 Subject: [PATCH] fix(#1526): skip cactus-named attributes in excessive-visibility A private constant written with "!" carries its local name two levels below the attribute, so the "not(@local)" guard missed it and the lint asked to obfuscate an attribute that was already obfuscated. The rule now skips every attribute whose name holds the cactus, the same guard unoptimizable-recursion uses. --- .../eolang/lints/design/excessive-visibility.xsl | 2 +- .../allows-already-private-constant.yaml | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/test/resources/org/eolang/lints/packs/single/excessive-visibility/allows-already-private-constant.yaml diff --git a/src/main/resources/org/eolang/lints/design/excessive-visibility.xsl b/src/main/resources/org/eolang/lints/design/excessive-visibility.xsl index 59968b52b..05a76d898 100644 --- a/src/main/resources/org/eolang/lints/design/excessive-visibility.xsl +++ b/src/main/resources/org/eolang/lints/design/excessive-visibility.xsl @@ -23,7 +23,7 @@ only hide a value other files may legitimately read. --> - +