Fully support YAML on fmt and lint --fix - #884
Conversation
There was a problem hiding this comment.
24 issues found across 58 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="test/format/pass_yaml_comments.clitest">
<violation number="1" location="test/format/pass_yaml_comments.clitest:15">
P3: This test omits `--verbose`, so it never checks the formatter's diagnostic output; run it verbosely and assert the expected stdout and stderr alongside the rewritten YAML.
(Based on your team's feedback about verbose stream assertions.)</violation>
</file>
<file name="test/lint/pass_lint_fix_yml.clitest">
<violation number="1" location="test/lint/pass_lint_fix_yml.clitest:11">
P2: This test never exercises verbose diagnostics for YAML autofix. Add `--verbose` and assert the expected stdout and stderr.
(Based on your team's feedback about capturing verbose test output.)</violation>
</file>
<file name="test/format/pass_yaml_flow_root.clitest">
<violation number="1" location="test/format/pass_yaml_flow_root.clitest:5">
P2: This test only exercises the silent path, so it misses regressions in verbose stdout/stderr reporting for YAML formatting. Run `fmt` with `--verbose` and assert the captured `1>`/`2>` output.
(Based on your team's feedback about capturing verbose command output.)</violation>
</file>
<file name="test/format/pass_yaml_crlf.sh">
<violation number="1" location="test/format/pass_yaml_crlf.sh:17">
P2: This non-verbose invocation checks only stdout, so unexpected stderr from a successful `fmt` run goes unnoticed. Run with `--verbose`, capture both streams, and assert their expected contents.
(Based on your team's feedback about capturing test output streams.)</violation>
</file>
<file name="test/format/pass_check_yaml.clitest">
<violation number="1" location="test/format/pass_check_yaml.clitest:8">
P3: This test checks only the exit status and misses unexpected stdout or stderr. Run with `--verbose` and assert the expected output streams, as the JSON check test does.
(Based on your team's feedback about capturing stdout and stderr in verbose tests.)</violation>
</file>
<file name="test/format/pass_extension_empty_yaml.clitest">
<violation number="1" location="test/format/pass_extension_empty_yaml.clitest:8">
P3: Run this test with `--verbose` and assert the captured output; as written, it never checks fmt’s per-file messages for the extensionless YAML file.
(Based on your team's feedback about capturing both output streams in verbose tests.)</violation>
</file>
<file name="test/format/pass_yaml_directory.clitest">
<violation number="1" location="test/format/pass_yaml_directory.clitest:16">
P2: This run checks only the empty default output, not which directory inputs `fmt` processed. Add `--verbose` and assert the expected output for both files.
(Based on your team's feedback about capturing verbose command output.)</violation>
</file>
<file name="test/format/pass_custom_extension_yaml.clitest">
<violation number="1" location="test/format/pass_custom_extension_yaml.clitest:7">
P3: This test checks only the silent default path, so regressions in `fmt`'s verbose output for custom-extension YAML go undetected. Run with `--verbose` and assert the expected output, including both streams.
(Based on your team's feedback about capturing verbose command output.)</violation>
</file>
<file name="test/format/pass_yaml_document_markers.clitest">
<violation number="1" location="test/format/pass_yaml_document_markers.clitest:10">
P2: Run this case with `--verbose` and assert the resulting stream output; the current invocation only covers the default silent path and misses verbose diagnostics.
(Based on your team's feedback about verbose test output.)</violation>
</file>
<file name="test/lint/pass_lint_fix_yaml.clitest">
<violation number="1" location="test/lint/pass_lint_fix_yaml.clitest:11">
P3: The two runs assert only one stream each, so unexpected output on the other stream passes unnoticed. Run both with `--verbose` and assert stdout and stderr for each.
(Based on your team's feedback about capturing both output streams.)</violation>
</file>
<file name="test/format/pass_yaml_idempotent.clitest">
<violation number="1" location="test/format/pass_yaml_idempotent.clitest:10">
P3: These runs only assert that non-verbose `fmt` produces no output, leaving its formatting diagnostics untested. Add `--verbose` to both invocations and assert the expected `Formatting:` stderr lines.
(Based on your team's feedback about capturing command output in silent tests.)</violation>
</file>
<file name="test/format/pass_yaml.clitest">
<violation number="1" location="test/format/pass_yaml.clitest:12">
P3: This test does not exercise the formatter's verbose output, so regressions in its progress diagnostics remain unverified. Run `fmt` with `--verbose` and assert the captured stdout and stderr.
(Based on your team's feedback about capturing stdout and stderr in verbose tests.)</violation>
</file>
<file name="test/lint/pass_lint_fix_extension_empty_yaml.clitest">
<violation number="1" location="test/lint/pass_lint_fix_extension_empty_yaml.clitest:13">
P3: This case does not assert verbose per-file output; add `--verbose` and assert the matched YAML file's `Linting:` line.
(Based on your team's feedback about verbose test output.)</violation>
</file>
<file name="test/format/pass_yaml_intact_mtime.clitest">
<violation number="1" location="test/format/pass_yaml_intact_mtime.clitest:12">
P2: This silent-mode invocation leaves the formatter's verbose reporting path untested; run it with `--verbose` and assert the expected stdout and stderr.
(Based on your team's feedback about verbose test output capture.)</violation>
</file>
<file name="test/lint/pass_lint_fix_yaml_no_changes.clitest">
<violation number="1" location="test/lint/pass_lint_fix_yaml_no_changes.clitest:12">
P3: This checks only the quiet invocation, so it misses regressions in verbose diagnostics for a clean YAML schema. Add a `--verbose` run and assert the expected output from both streams.
(Based on your team's feedback about verbose test output.)</violation>
</file>
<file name="test/lint/pass_lint_fix_without_extension_yaml.clitest">
<violation number="1" location="test/lint/pass_lint_fix_without_extension_yaml.clitest:11">
P2: This successful `--fix` test is non-verbose, so it cannot catch unexpected diagnostic output exposed in verbose mode. Add `--verbose` and assert the expected stdout and stderr.
(Based on your team's feedback about capturing command output in verbose tests.)</violation>
</file>
<file name="test/lint/pass_lint_fix_format_yaml_keep_ordering.clitest">
<violation number="1" location="test/lint/pass_lint_fix_format_yaml_keep_ordering.clitest:11">
P3: This case checks only default output, leaving verbose YAML lint reporting untested. Run it with `--verbose` and assert the resulting stdout and stderr.</violation>
</file>
<file name="test/format/pass_yaml_scalar_styles.clitest">
<violation number="1" location="test/format/pass_yaml_scalar_styles.clitest:14">
P3: This only verifies quiet-mode behavior and never checks the verbose diagnostics for this YAML formatting path. Add a `--verbose` invocation and assert its stream-tagged output.
(Based on your team's feedback about capturing verbose output streams.) .</violation>
</file>
<file name="test/lint/pass_lint_fix_yaml_comments.clitest">
<violation number="1" location="test/lint/pass_lint_fix_yaml_comments.clitest:14">
P3: This only checks the default progress marker; run with `--verbose` and assert both streams to catch regressions in lint/fix reporting.
(Based on your team's feedback about verbose test output.)</violation>
</file>
<file name="test/lint/pass_lint_fix_format_yaml.clitest">
<violation number="1" location="test/lint/pass_lint_fix_format_yaml.clitest:11">
P3: This success case checks only stderr, so unexpected stdout can go unnoticed; run it with `--verbose` and assert both streams.
(Based on your team's feedback about capturing stdout and stderr in verbose tests.)</violation>
</file>
<file name="test/format/pass_yml.clitest">
<violation number="1" location="test/format/pass_yml.clitest:7">
P3: Run this case with `--verbose` and assert the expected output on both streams; the current assertion misses regressions in formatter status output.
(Based on your team's feedback about capturing verbose command output.)</violation>
</file>
<file name="test/lint/pass_lint_openapi_fix_yaml.clitest">
<violation number="1" location="test/lint/pass_lint_openapi_fix_yaml.clitest:18">
P3: This test omits `--verbose`, so it cannot catch regressions in lint's verbose output; run it verbosely and assert the expected stdout and stderr.
(Based on your team's feedback about verbose test output.)</violation>
</file>
<file name="test/format/pass_without_extension_yaml.clitest">
<violation number="1" location="test/format/pass_without_extension_yaml.clitest:11">
P2: This test only asserts the silent default path and misses regressions in `fmt`'s verbose output. Run with `--verbose` and assert the expected stdout and stderr.
(Based on your team's feedback about capturing verbose command output.)</violation>
</file>
<file name="test/lint/pass_lint_fix_custom_extension_yaml.clitest">
<violation number="1" location="test/lint/pass_lint_fix_custom_extension_yaml.clitest:11">
P3: This test checks only the default `.` status, so it misses regressions in verbose processing output for custom-extension YAML. Add `--verbose` and assert the complete output streams.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| title: I should not be moved up | ||
| EOF | ||
|
|
||
| RUN lint schema.yml --fix STDIN /dev/null IN . INTO result_0.txt EXPECTING 0 |
There was a problem hiding this comment.
P2: This test never exercises verbose diagnostics for YAML autofix. Add --verbose and assert the expected stdout and stderr.
(Based on your team's feedback about capturing verbose test output.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/lint/pass_lint_fix_yml.clitest, line 11:
<comment>This test never exercises verbose diagnostics for YAML autofix. Add `--verbose` and assert the expected stdout and stderr.
(Based on your team's feedback about capturing verbose test output.) </comment>
<file context>
@@ -0,0 +1,28 @@
+title: I should not be moved up
+EOF
+
+RUN lint schema.yml --fix STDIN /dev/null IN . INTO result_0.txt EXPECTING 0
+
+WRITE expected_file_0.txt UNTIL EOF
</file context>
| { $schema: "https://json-schema.org/draft/2020-12/schema", type: string, title: Flow } | ||
| EOF | ||
|
|
||
| RUN fmt schema.yaml STDIN /dev/null IN . INTO result.txt EXPECTING 0 |
There was a problem hiding this comment.
P2: This test only exercises the silent path, so it misses regressions in verbose stdout/stderr reporting for YAML formatting. Run fmt with --verbose and assert the captured 1>/2> output.
(Based on your team's feedback about capturing verbose command output.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/format/pass_yaml_flow_root.clitest, line 5:
<comment>This test only exercises the silent path, so it misses regressions in verbose stdout/stderr reporting for YAML formatting. Run `fmt` with `--verbose` and assert the captured `1>`/`2>` output.
(Based on your team's feedback about capturing verbose command output.) </comment>
<file context>
@@ -0,0 +1,16 @@
+{ $schema: "https://json-schema.org/draft/2020-12/schema", type: string, title: Flow }
+EOF
+
+RUN fmt schema.yaml STDIN /dev/null IN . INTO result.txt EXPECTING 0
+
+WRITE expected.txt UNTIL EOF
</file context>
| EOF | ||
| awk '{ printf "%s\r\n", $0 }' "$TMP/lf.yaml" > "$TMP/schema.yaml" | ||
|
|
||
| "$1" fmt "$TMP/schema.yaml" > "$TMP/output.txt" |
There was a problem hiding this comment.
P2: This non-verbose invocation checks only stdout, so unexpected stderr from a successful fmt run goes unnoticed. Run with --verbose, capture both streams, and assert their expected contents.
(Based on your team's feedback about capturing test output streams.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/format/pass_yaml_crlf.sh, line 17:
<comment>This non-verbose invocation checks only stdout, so unexpected stderr from a successful `fmt` run goes unnoticed. Run with `--verbose`, capture both streams, and assert their expected contents.
(Based on your team's feedback about capturing test output streams.) </comment>
<file context>
@@ -0,0 +1,31 @@
+EOF
+awk '{ printf "%s\r\n", $0 }' "$TMP/lf.yaml" > "$TMP/schema.yaml"
+
+"$1" fmt "$TMP/schema.yaml" > "$TMP/output.txt"
+
+cat << 'EOF' > "$TMP/expected_output.txt"
</file context>
| } | ||
| EOF | ||
|
|
||
| RUN fmt schemas STDIN /dev/null IN . INTO result.txt EXPECTING 0 |
There was a problem hiding this comment.
P2: This run checks only the empty default output, not which directory inputs fmt processed. Add --verbose and assert the expected output for both files.
(Based on your team's feedback about capturing verbose command output.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/format/pass_yaml_directory.clitest, line 16:
<comment>This run checks only the empty default output, not which directory inputs `fmt` processed. Add `--verbose` and assert the expected output for both files.
(Based on your team's feedback about capturing verbose command output.) </comment>
<file context>
@@ -0,0 +1,40 @@
+}
+EOF
+
+RUN fmt schemas STDIN /dev/null IN . INTO result.txt EXPECTING 0
+
+WRITE expected.txt UNTIL EOF
</file context>
| const: bar | ||
| EOF | ||
|
|
||
| RUN lint schema.yaml --fix STDIN /dev/null IN . INTO result_0.txt EXPECTING 0 |
There was a problem hiding this comment.
P3: This only checks the default progress marker; run with --verbose and assert both streams to catch regressions in lint/fix reporting.
(Based on your team's feedback about verbose test output.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/lint/pass_lint_fix_yaml_comments.clitest, line 14:
<comment>This only checks the default progress marker; run with `--verbose` and assert both streams to catch regressions in lint/fix reporting.
(Based on your team's feedback about verbose test output.) </comment>
<file context>
@@ -0,0 +1,34 @@
+ const: bar
+EOF
+
+RUN lint schema.yaml --fix STDIN /dev/null IN . INTO result_0.txt EXPECTING 0
+
+WRITE expected_file_0.txt UNTIL EOF
</file context>
| title: I should not be moved up | ||
| EOF | ||
|
|
||
| RUN lint schema.yaml --fix --format STDIN /dev/null IN . INTO result_0.txt EXPECTING 0 |
There was a problem hiding this comment.
P3: This success case checks only stderr, so unexpected stdout can go unnoticed; run it with --verbose and assert both streams.
(Based on your team's feedback about capturing stdout and stderr in verbose tests.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/lint/pass_lint_fix_format_yaml.clitest, line 11:
<comment>This success case checks only stderr, so unexpected stdout can go unnoticed; run it with `--verbose` and assert both streams.
(Based on your team's feedback about capturing stdout and stderr in verbose tests.) </comment>
<file context>
@@ -0,0 +1,52 @@
+title: I should not be moved up
+EOF
+
+RUN lint schema.yaml --fix --format STDIN /dev/null IN . INTO result_0.txt EXPECTING 0
+
+WRITE expected_file_0.txt UNTIL EOF
</file context>
| title: Hello World | ||
| EOF | ||
|
|
||
| RUN fmt schema.yml STDIN /dev/null IN . INTO result.txt EXPECTING 0 |
There was a problem hiding this comment.
P3: Run this case with --verbose and assert the expected output on both streams; the current assertion misses regressions in formatter status output.
(Based on your team's feedback about capturing verbose command output.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/format/pass_yml.clitest, line 7:
<comment>Run this case with `--verbose` and assert the expected output on both streams; the current assertion misses regressions in formatter status output.
(Based on your team's feedback about capturing verbose command output.) </comment>
<file context>
@@ -0,0 +1,20 @@
+title: Hello World
+EOF
+
+RUN fmt schema.yml STDIN /dev/null IN . INTO result.txt EXPECTING 0
+
+WRITE expected.txt UNTIL EOF
</file context>
| enum: [ foo ] | ||
| EOF | ||
|
|
||
| RUN lint api.yaml --fix STDIN /dev/null IN . INTO result_0.txt EXPECTING 0 |
There was a problem hiding this comment.
P3: This test omits --verbose, so it cannot catch regressions in lint's verbose output; run it verbosely and assert the expected stdout and stderr.
(Based on your team's feedback about verbose test output.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/lint/pass_lint_openapi_fix_yaml.clitest, line 18:
<comment>This test omits `--verbose`, so it cannot catch regressions in lint's verbose output; run it verbosely and assert the expected stdout and stderr.
(Based on your team's feedback about verbose test output.) </comment>
<file context>
@@ -0,0 +1,42 @@
+ enum: [ foo ]
+EOF
+
+RUN lint api.yaml --fix STDIN /dev/null IN . INTO result_0.txt EXPECTING 0
+
+WRITE expected_file_0.txt UNTIL EOF
</file context>
| title: I should not be moved up | ||
| EOF | ||
|
|
||
| RUN lint schema.custom --fix STDIN /dev/null IN . INTO result_0.txt EXPECTING 0 |
There was a problem hiding this comment.
P3: This test checks only the default . status, so it misses regressions in verbose processing output for custom-extension YAML. Add --verbose and assert the complete output streams.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/lint/pass_lint_fix_custom_extension_yaml.clitest, line 11:
<comment>This test checks only the default `.` status, so it misses regressions in verbose processing output for custom-extension YAML. Add `--verbose` and assert the complete output streams.</comment>
<file context>
@@ -0,0 +1,28 @@
+title: I should not be moved up
+EOF
+
+RUN lint schema.custom --fix STDIN /dev/null IN . INTO result_0.txt EXPECTING 0
+
+WRITE expected_file_0.txt UNTIL EOF
</file context>
There was a problem hiding this comment.
1 issue found across 16 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="test/format/fail_json_multidocument_stdin.clitest">
<violation number="1" location="test/format/fail_json_multidocument_stdin.clitest:7">
P2: This test checks only the human-readable error, leaving the `--json` path for multi-document stdin untested. Add a matching `fmt - --json` invocation and assert its structured error.
(Based on your team's feedback about JSON variants for error tests.)</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| EOF | ||
|
|
||
| // Not supported | ||
| RUN fmt - STDIN stdin_0 IN . INTO result.txt EXPECTING 3 |
There was a problem hiding this comment.
P2: This test checks only the human-readable error, leaving the --json path for multi-document stdin untested. Add a matching fmt - --json invocation and assert its structured error.
(Based on your team's feedback about JSON variants for error tests.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/format/fail_json_multidocument_stdin.clitest, line 7:
<comment>This test checks only the human-readable error, leaving the `--json` path for multi-document stdin untested. Add a matching `fmt - --json` invocation and assert its structured error.
(Based on your team's feedback about JSON variants for error tests.) </comment>
<file context>
@@ -0,0 +1,14 @@
+EOF
+
+// Not supported
+RUN fmt - STDIN stdin_0 IN . INTO result.txt EXPECTING 3
+
+WRITE expected.txt UNTIL EOF
</file context>
🤖 Augment PR SummarySummary: This PR adds YAML round-trip support to schema formatting and lint autofixes.
🤖 Was this summary useful? React with 👍 or 👎 |
| // document root sits one level further out than the leftmost column. | ||
| // See https://yaml.org/spec/1.2.2/#8111-block-indentation-indicator | ||
| content_indent = this->block_indent_ == SIZE_MAX | ||
| ? explicit_indent - 1 |
There was a problem hiding this comment.
A root document node has indentation level 0, so an explicit |2 requires two leading content spaces under YAML §8.1.1.1. Subtracting one makes valid input such as |2\n text\n retain one leading space in its parsed value, rather than parsing it as "text\n".
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| input.data(), | ||
| std::min(lexer.bom_length() + parser.position(), input.size())}; | ||
| roundtrip.byte_order_mark = lexer.bom_length() > 0; | ||
| roundtrip.carriage_returns = document.find("\r\n") != document.npos; |
There was a problem hiding this comment.
A YAML line break may be a lone \r, which the lexer already treats as a line break, but this only records CRLF and therefore fmt/lint --fix rewrites CR-only YAML with LF endings. That violates the new round-trip preservation behavior for a valid input presentation.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
1 issue found across 15 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="test/lint/pass_lint_stdin_multidocument.clitest">
<violation number="1" location="test/lint/pass_lint_stdin_multidocument.clitest:19">
P2: This test checks only text diagnostics, leaving JSON reporting for multi-document stdin untested. Add an equivalent `--json` invocation and assert its structured output.
(Based on your team's feedback about JSON variants for error tests.)</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| EOF | ||
|
|
||
| // Validation failure | ||
| RUN lint - STDIN stdin_input IN . INTO result_0.txt EXPECTING 2 |
There was a problem hiding this comment.
P2: This test checks only text diagnostics, leaving JSON reporting for multi-document stdin untested. Add an equivalent --json invocation and assert its structured output.
(Based on your team's feedback about JSON variants for error tests.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/lint/pass_lint_stdin_multidocument.clitest, line 19:
<comment>This test checks only text diagnostics, leaving JSON reporting for multi-document stdin untested. Add an equivalent `--json` invocation and assert its structured output.
(Based on your team's feedback about JSON variants for error tests.) </comment>
<file context>
@@ -0,0 +1,36 @@
+EOF
+
+// Validation failure
+RUN lint - STDIN stdin_input IN . INTO result_0.txt EXPECTING 2
+
+WRITE expected_0.txt UNTIL EOF
</file context>
There was a problem hiding this comment.
1 issue found across 25 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="test/format/pass_yaml_anchors.clitest">
<violation number="1" location="test/format/pass_yaml_anchors.clitest:12">
P3: This empty-output assertion skips verbose diagnostics, so it cannot catch regressions in the command's verbose output. Run `fmt` with `--verbose` and assert the expected stdout and stderr lines.
(Based on your team's feedback about verbose test output.)</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| last: *name | ||
| EOF | ||
|
|
||
| RUN fmt schema.yaml STDIN /dev/null IN . INTO result.txt EXPECTING 0 |
There was a problem hiding this comment.
P3: This empty-output assertion skips verbose diagnostics, so it cannot catch regressions in the command's verbose output. Run fmt with --verbose and assert the expected stdout and stderr lines.
(Based on your team's feedback about verbose test output.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/format/pass_yaml_anchors.clitest, line 12:
<comment>This empty-output assertion skips verbose diagnostics, so it cannot catch regressions in the command's verbose output. Run `fmt` with `--verbose` and assert the expected stdout and stderr lines.
(Based on your team's feedback about verbose test output.) </comment>
<file context>
@@ -0,0 +1,32 @@
+ last: *name
+EOF
+
+RUN fmt schema.yaml STDIN /dev/null IN . INTO result.txt EXPECTING 0
+
+WRITE expected.txt UNTIL EOF
</file context>
888f5be to
47328a5
Compare
|
@cubic-dev-ai review |
@jviotti I have started the AI code review. It will take a few minutes to complete. |
|
augment review |
|
This pull request is abnormally large and would use a significant amount of tokens to review. If you still wish to review it, comment "augment review" and we will review it. |
There was a problem hiding this comment.
All reported issues were addressed across 77 files
Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.
Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 5 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="test/validate/fail_yaml_multi_empty_document.clitest">
<violation number="1" location="test/validate/fail_yaml_multi_empty_document.clitest:21">
P2: This failure test checks only human-readable output, leaving the JSON error representation for an empty YAML document untested. Add a corresponding `validate --json` invocation and assert its structured output.
(Based on your team's feedback about JSON variants for failure tests.)</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| EOF | ||
|
|
||
| // Validation failure | ||
| RUN validate schema.json instance.yaml STDIN /dev/null IN . INTO result_0.txt EXPECTING 2 |
There was a problem hiding this comment.
P2: This failure test checks only human-readable output, leaving the JSON error representation for an empty YAML document untested. Add a corresponding validate --json invocation and assert its structured output.
(Based on your team's feedback about JSON variants for failure tests.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/validate/fail_yaml_multi_empty_document.clitest, line 21:
<comment>This failure test checks only human-readable output, leaving the JSON error representation for an empty YAML document untested. Add a corresponding `validate --json` invocation and assert its structured output.
(Based on your team's feedback about JSON variants for failure tests.) </comment>
<file context>
@@ -0,0 +1,41 @@
+EOF
+
+// Validation failure
+RUN validate schema.json instance.yaml STDIN /dev/null IN . INTO result_0.txt EXPECTING 2
+
+WRITE expected_0.txt UNTIL EOF
</file context>
Uh oh!
There was an error while loading. Please reload this page.