[#2704] Fixed SDC lint check passing when 'sdc-devel:validate' reports problems.#2705
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (61)
📒 Files selected for processing (6)
WalkthroughAcross ChangesSDC Lint Output-Based Failure Detection
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
📖 Documentation preview for this pull request has been deployed to Netlify: https://6a3a88b68fb9e5d3bc4c0d10--vortex-docs.netlify.app This preview is rebuilt on every commit and is not the production documentation site. |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2705 +/- ##
==========================================
- Coverage 86.67% 86.22% -0.45%
==========================================
Files 96 89 -7
Lines 4719 4560 -159
Branches 47 3 -44
==========================================
- Hits 4090 3932 -158
+ Misses 629 628 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…s problems. 'sdc-devel:validate' always exits 0, so the ahoy and CI checks never failed on real component problems, and its success message contains the word 'errors', so a case-insensitive grep would also fail clean builds. Capture the command output and fail on a case-sensitive 'Critical'/'Error'/'Warning' match (advisory 'Notice' still passes), preserving the 'VORTEX_CI_SDC_DEVEL_IGNORE_FAILURE' opt-out. Added a functional test asserting the check passes on valid components and fails on a component with a Twig error.
40d8292 to
4bee8e6
Compare
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
Closes #2704
Summary
The SDC lint gate introduced in #2671 was never actually enforced:
drush sdc-devel:validatealways exits 0 regardless of whether it found problems, so the check silently passed even when components had Twig errors or missing templates. This PR makes the gate functional by capturing the command output and pattern-matching against the severity labels thatsdc_develactually emits.Changes
.ahoy.yml-lint-sdccommand now capturesdrush sdc-devel:validateoutput and exits 1 when the output containsCritical,Error(s), orWarning(s). The exit-code check is replaced with an output grep because (a) the command always exits 0, and (b) the success message itself contains the word "errors" (lowercase), making a case-insensitive match impossible..github/workflows/build-test-deploy.yml- "Validate Single Directory Components" step applies the same capture-and-grep approach. Thecontinue-on-erroropt-out viaVORTEX_CI_SDC_DEVEL_IGNORE_FAILUREis preserved..circleci/config.yml- Equivalent fix; theVORTEX_CI_SDC_DEVEL_IGNORE_FAILUREguard is preserved..vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php- AddedsubtestAhoyLintSdcwith two assertions:ahoy lint-sdcpasses on the valid shipped theme components (false-positive guard), and fails when a component template contains an unterminated Twig tag (proving the gate catches real breakage)..vortex/tests/phpunit/Functional/AhoyWorkflowTest.php- Wired insubtestAhoyLintSdc.lint-sdccommand body and CI step contents.Before / After
Summary by CodeRabbit
Chores
Tests