redhat-developer / redhat-developer/yaml-language-server

Editor shows syntax errors for helm charts with flow control statements (if/else/with/range)

Open
#766 2 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.