redhat-developer / redhat-developer/yaml-language-server
Editor shows syntax errors for helm charts with flow control statements (if/else/with/range)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 352
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 11
Description
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
- Mac
- Linux
- other (please specify)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the Eclipse generic text editor using the Helm-templated YAML example, focusing on the flow-control lines and the repeated Build operations. Trace the YAML language server's parsing and build-trigger behavior until you can prevent false syntax errors and confirm that opening the file no longer starts an endless build loop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100