Skip to content

Commit

Permalink
Modify rule S117: Add exception to kubernetes language
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-wielage-sonarsource committed Dec 5, 2024
1 parent 11265c1 commit b968d09
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion rules/S117/kubernetes/rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -51,6 +63,11 @@ data:
{{ $keyC }}: {{ $valC | quote }}
{{- end }}
----

[source,text]
----
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className -}}
----
== Resources

=== Documentation
Expand Down

0 comments on commit b968d09

Please sign in to comment.