yaml-language-server
yaml-language-server copied to clipboard
Editor shows syntax errors for helm charts with flow control statements (if/else/with/range)
Describe the bug
Eclipse editor shows errors for flow control statements https://helm.sh/docs/chart_template_guide/control_structures/
Additionally, it seems that those errors lead to an endless loop of 'Build' operations every second.
Expected Behavior
Editor opens the file, no syntax errors.
Current Behavior
Editor opens the file, but shows syntax errors for lines with helm flow control statements:
Multiple markers at this line
- Block collections are not allowed within flow collections
- Missing , or : between flow map items
- Implicit map keys need to be followed by map values
- Implicit keys need to be on a single line
Steps to Reproduce
Open
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}
{{- if .Values.something.enabled }}
something: "true"
{{- end}}
in eclipse generic text editor (wild wild web developer). Errors in line 8 and 10.
Environment
- [ ] Windows
- [x] Mac
- [ ] Linux
- [ ] other (please specify)
@mickaelistria Is this relevant to yaml-language-server
?
Yes. Eclipse IDE embed yaml-language-server, and opening the file makes the language server return the described errors.