Skip to content

Yaml Showcase #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .coderabbit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
reviews:
path_filters: ["**/*.yml","**/*.yaml"]
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.