test+docs: raise CLI scan coverage and add CI scan examples#275
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds CLI Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35b317b1b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| image: ghcr.io/fernandotonon/qtmesh:latest | ||
| script: | ||
| - scan \${CI_PROJECT_DIR}/assets \\ |
There was a problem hiding this comment.
Override entrypoint in GitLab CI example
This snippet is likely to fail when copied into real GitLab pipelines because our container sets ENTRYPOINT ["docker-entrypoint.sh"] and that entrypoint only recognizes qtmesh subcommands as argv[1]; GitLab Docker executor starts jobs by passing sh/bash as the command, so the entrypoint falls through and runs qtmesheditor --cli sh ... instead of the scan command. In practice that exits as an unknown subcommand before scanning, so the docs should show an entrypoint: [""] override (or wrap with docker run) for a working job.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 9cfc829.
Updated the GitLab CI example to include entrypoint: [""], so the job command runs correctly with GitLab Docker executor semantics.
There was a problem hiding this comment.
Addressed in 612cd30.
Updated the GitLab CI snippet to run explicit CLI mode under entrypoint: [""]:
qtmesheditor --cli scan ...- also pinned the image to
ghcr.io/fernandotonon/qtmesh:2.23.0.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/CLIPipeline_test.cpp`:
- Around line 1776-1780: The test TEST(CLIPipelineCmdScanError,
MissingConfigFileReturns2) currently uses a fixed path that may exist on some
runners; modify the test to generate a unique, guaranteed-nonexistent config
path at runtime (e.g., build a path from std::filesystem::temp_directory_path()
plus a unique token or use a secure temp-name generator) before constructing
TestArgv and calling CLIPipeline::cmdScan, and assert the file does not exist
prior to invoking cmdScan so the test is deterministic across
Windows/Linux/macOS.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3ae3ac3f-7064-430e-ab22-f882739c3e51
📒 Files selected for processing (3)
src/CLIPipeline_test.cppsrc/mainwindow_test.cppwebsite/src/DocsApp.jsx
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
website/src/DocsApp.jsx (1)
687-687: Pin CI example references instead of floating refs.Using
@masterand:latestin docs weakens reproducibility and supply-chain safety for users copying these CI snippets. Prefer a release tag or immutable digest/SHA.Proposed doc adjustment
-- uses: fernandotonon/QtMeshEditor/.github/actions/qtmesh@master +- uses: fernandotonon/QtMeshEditor/.github/actions/qtmesh@<pinned-tag-or-commit-sha> - image: ghcr.io/fernandotonon/qtmesh:latest + image: ghcr.io/fernandotonon/qtmesh@sha256:<pinned-digest>Also applies to: 721-721
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@website/src/DocsApp.jsx` at line 687, The docs include an Action reference pinned to a floating ref (CodeBlock showing "fernandotonon/QtMeshEditor/.github/actions/qtmesh@master"); update that string inside the CodeBlock component (and the other occurrence at the same snippet) to use an immutable tag or commit SHA (e.g., `@vX.Y.Z` or @<commit-sha>) instead of `@master/`@latest so CI examples are reproducible and supply-chain safe.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@website/src/DocsApp.jsx`:
- Around line 722-728: The CI example currently overrides the container startup
with entrypoint: [""] which bypasses the image's entrypoint logic that normally
adds --cli, so update the script invocation under the script: block to call the
scanner binary in explicit CLI mode by adding the --cli flag before the target
path (i.e., ensure the scan command includes --cli) or, alternatively, remove
the entrypoint: [""] override so the image's launcher supplies --cli; adjust the
entrypoint/script accordingly to guarantee the scanner runs with CLI mode.
---
Nitpick comments:
In `@website/src/DocsApp.jsx`:
- Line 687: The docs include an Action reference pinned to a floating ref
(CodeBlock showing "fernandotonon/QtMeshEditor/.github/actions/qtmesh@master");
update that string inside the CodeBlock component (and the other occurrence at
the same snippet) to use an immutable tag or commit SHA (e.g., `@vX.Y.Z` or
@<commit-sha>) instead of `@master/`@latest so CI examples are reproducible and
supply-chain safe.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ddb00bd2-b978-483a-88ea-43374bb05407
📒 Files selected for processing (2)
src/CLIPipeline_test.cppwebsite/src/DocsApp.jsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/CLIPipeline_test.cpp
|
Addressed the remaining review note in Changes in docs CI snippets:
Also verified website build locally ( |
|



Summary
CLIPipeline::cmdScantests to cover new scan command pathsMainWindowtests for pivot shortcut and group/ungroup action behavior.gitlab-ci.ymljob + artifacts)Why
Recent feature additions reduced coverage. These tests target quick-win uncovered paths, and docs now include copy/paste CI examples for scan in both GitHub Actions and GitLab.
Changes
src/CLIPipeline_test.cpp--fail-on/ invalid scan root*.fbx-> nested matches)qtmesh.ymlreport outputssrc/mainwindow_test.cppPshortcut cycles pivot modewebsite/src/DocsApp.jsxscanexample in GitHub Actions sectionValidation
npm ci && npm run build)Summary by CodeRabbit