SonarJS
SonarJS copied to clipboard
Parsing error on Helm Chart YAML files
Since SonarJs parses Yaml files to analyze possible JavaScript code inside, parser errors occur in YAML files containing Helm chart template directives. These directives do not follow the YAML standard.
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "hello-world.fullname" . }}
labels:
{{- include "hello-world.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "hello-world.selectorLabels" . | nindent 6 }}
...
Since these files do not contain valid JavaScript code, they should not be parsed and should be excluded from parsing by preprocessing. (See also SONARIAC-435)
I am reopening this ticket, because the new predicate is not used in the sensor, which should be fixed