Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions yaml/invalid.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Sample
version: 1.0
items:
- id: 1
name: Item One
Comment on lines +1 to +5
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Indentation error makes YAML unparsable

version is indented without a parent mapping, producing a syntax error. Align all top-level keys and keep one blank line max.

-name: Sample
-  version: 1.0
-items:
-  - id: 1
-    name: Item One
+name: Sample
+version: 1.0
+items:
+  - id: 1
+    name: Item One
+
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
name: Sample
version: 1.0
items:
- id: 1
name: Item One
name: Sample
version: 1.0
items:
- id: 1
name: Item One
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 2-2: syntax error: mapping values are not allowed here

(syntax)

🤖 Prompt for AI Agents
In yaml/invalid.yaml lines 1 to 5, the key 'version' is incorrectly indented,
causing a YAML syntax error. Fix this by aligning 'version' with the other
top-level keys like 'name' and 'items', ensuring consistent indentation. Also,
verify that there is at most one blank line between top-level mappings to
maintain proper YAML structure.