From b968d09f0c602cc1e8663e41b83af711f6b961d8 Mon Sep 17 00:00:00 2001 From: Jonas Wielage Date: Thu, 5 Dec 2024 17:33:34 +0100 Subject: [PATCH] Modify rule S117: Add exception to kubernetes language --- rules/S117/kubernetes/rule.adoc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/rules/S117/kubernetes/rule.adoc b/rules/S117/kubernetes/rule.adoc index ef29d9a8dbe..9e4780f552f 100644 --- a/rules/S117/kubernetes/rule.adoc +++ b/rules/S117/kubernetes/rule.adoc @@ -4,10 +4,22 @@ :identifier_or: local variable or function parameter :regex: ^[a-z][a-zA-Z0-9]*$ -include::../rule.adoc[] + +include::../introduction.adoc[] + +include::../why-is-this-an-issue.adoc[] + +=== Exceptions + +The rule does not raise an issue on the usage of the blank identifier `_`. + +include::../what-is-the-potential-impact.adoc[] + +include::../how-to-fix-it.adoc[] As a default, we suggest using the camelCase naming convention, as this is widely adopted for variables in Helm. + === Code examples ==== Noncompliant code example @@ -51,6 +63,11 @@ data: {{ $keyC }}: {{ $valC | quote }} {{- end }} ---- + +[source,text] +---- +{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className -}} +---- == Resources === Documentation