Skip to content

chore: use pixi to manage the format tools and format the world#330

Merged
16bit-ykiko merged 7 commits into
mainfrom
update-build-docs
Dec 28, 2025
Merged

chore: use pixi to manage the format tools and format the world#330
16bit-ykiko merged 7 commits into
mainfrom
update-build-docs

Conversation

@16bit-ykiko

@16bit-ykiko 16bit-ykiko commented Dec 28, 2025

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Aligned build/test targets with repository layout and updated tooling manifests.
    • Removed legacy pre-commit configuration.
  • New Features
    • Added/standardized project formatting configs and tooling (Prettier, tombi) and expanded format/dev tasks.
  • CI
    • Renamed and revised the format/check workflow with automated suggestion steps.
  • Docs
    • Many formatting and content polish across English and Chinese docs, plus enabled some previously-commented config defaults.
  • Editors
    • Consolidated and cleaned VS Code configuration and recommendations.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 28, 2025

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

CMake and xmake build targets were updated to use new source paths for two executables; CI/formatting workflows and tool configs were added or modified; many docs and editor files received formatting, front-matter, or minor content edits.

Changes

Cohort / File(s) Summary
Build targets
CMakeLists.txt, xmake.lua
Updated executable sources: clice from bin/clice.ccsrc/clice.cc; unit_tests from bin/unit_tests.cctests/unit/unit_tests.cc.
CI / Workflow
.github/workflows/check-format.yml, pixi.toml
Rewrote format check workflow (permissions, renamed job, new formatter run, reviewdog suggester); expanded pixi manifest with format/develop tasks and command arrays.
Formatting & tooling configs
.prettierrc.yaml, tombi.toml, .clang-format, .pre-commit-config.yaml
Added Prettier and tombi configs; removed clang-format version comment; deleted old pre-commit config and centralized formatting tooling.
Docs & VitePress
docs/.vitepress/config.ts, docs/**, README.md
Reorganized VitePress config structure and applied numerous doc front-matter/indentation and minor content adjustments across English/Chinese docs and README.
Editor integrations & extensions
editors/vscode/**, editors/zed/Cargo.toml
Large stylistic and lint config changes, quote/semicolon standardization, and minor refactors in VSCode extension TS files and tests; no public API changes.
Manifests & packaging
config/llvm-manifest.json, tests/pyproject.toml
Formatting and reflow of manifest/json/toml files; authors and dependency blocks reformatted without semantic changes.
Tests & fixtures
tests/**, tests/data/**
Test fixture doc/format tweaks and moved test source reference in build configs to new tests path.
Project metadata
pixi.toml, .coderabbit.yaml
Added/expanded CI/develop/format tasks and environments in pixi.toml; added .coderabbit.yaml with chat.auto_reply=false.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped through lines and paths anew,
Moved clice to src where fresh code grew,
Tests found a home where unit stories play,
Linters hum and docs tidy the way,
Tiny paws applaud: compile and stay! 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title directly reflects the main objective: using pixi to manage formatting tools and applying those tools across the codebase, which is evidenced by extensive formatting changes and new tooling configuration throughout the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-build-docs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc523b0 and 101136e.

📒 Files selected for processing (3)
  • CMakeLists.txt
  • src/clice.cc
  • tests/unit/unit_tests.cc
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: build (macos-15, Debug)
  • GitHub Check: build (windows-2025, RelWithDebInfo)
  • GitHub Check: build (ubuntu-24.04, Debug)
  • GitHub Check: build (macos-15, debug)
  • GitHub Check: build (ubuntu-24.04, releasedbg)
  • GitHub Check: build (ubuntu-24.04, debug)
  • GitHub Check: build (macos-15, releasedbg)
  • GitHub Check: build (windows-2025, releasedbg)
🔇 Additional comments (1)
CMakeLists.txt (1)

199-199: File move verified. The test source file has been successfully moved from bin/unit_tests.cc to tests/unit/unit_tests.cc, and no stray references to the old path remain in the codebase.

Comment thread CMakeLists.txt
@16bit-ykiko 16bit-ykiko changed the title chore: optimize build and update build docs chore: format the world Dec 28, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
docs/clice.toml (1)

19-23: Consider adding a comment for logging_dir for consistency.

Other directory settings (cache_dir, index_dir) have descriptive comments, but logging_dir is missing one.

🔎 Suggested improvement
 # Directory for storing index files.
 index_dir = "${workspace}/.clice/index"
+# Directory for storing log files.
 logging_dir = "${workspace}/.clice/logging"
pixi.toml (1)

76-79: Hardcoded build path in test tasks.

The unit-test and integration-test tasks assume ./build/bin/ as the binary location. This is reasonable for CI but may not match local development setups using different build directories.

Consider documenting this assumption or making the path configurable if developers commonly use different build directories.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 101136e and 7f3850b.

⛔ Files ignored due to path filters (1)
  • pixi.lock is excluded by !**/*.lock
📒 Files selected for processing (43)
  • .clang-format
  • .github/ISSUE_TEMPLATE/bug_report.md
  • .github/ISSUE_TEMPLATE/feature_request.md
  • .github/workflows/check-format.yml
  • .prettierrc.yaml
  • README.md
  • config/llvm-manifest.json
  • docs/.vitepress/config.ts
  • docs/.vitepress/theme/index.ts
  • docs/.vitepress/theme/sidebar.ts
  • docs/.vitepress/theme/style.css
  • docs/clice.toml
  • docs/en/dev/contribution.md
  • docs/en/dev/test-and-debug.md
  • docs/en/guide/configuration.md
  • docs/en/index.md
  • docs/zh/design/compilation.md
  • docs/zh/design/template-resolver.md
  • docs/zh/dev/build.md
  • docs/zh/dev/contribution.md
  • docs/zh/dev/test-and-debug.md
  • docs/zh/guide/configuration.md
  • docs/zh/guide/quick-start.md
  • docs/zh/index.md
  • editors/vscode/.eslintrc.json
  • editors/vscode/.vscode/extensions.json
  • editors/vscode/.vscode/launch.json
  • editors/vscode/.vscode/settings.json
  • editors/vscode/.vscode/tasks.json
  • editors/vscode/src/download.ts
  • editors/vscode/src/extension.ts
  • editors/vscode/src/feature/header.ts
  • editors/vscode/src/feature/highlight.ts
  • editors/vscode/src/setting.ts
  • editors/vscode/src/test/extension.test.ts
  • editors/vscode/tsconfig.json
  • editors/vscode/webpack.config.js
  • editors/zed/Cargo.toml
  • pixi.toml
  • tests/data/clang_tidy/clice.toml
  • tests/pyproject.toml
  • tombi.toml
  • xmake.lua
💤 Files with no reviewable changes (5)
  • docs/zh/guide/quick-start.md
  • .clang-format
  • docs/zh/design/template-resolver.md
  • docs/zh/dev/build.md
  • docs/zh/design/compilation.md
✅ Files skipped from review due to trivial changes (24)
  • config/llvm-manifest.json
  • editors/vscode/.vscode/extensions.json
  • editors/vscode/src/feature/header.ts
  • tests/pyproject.toml
  • docs/zh/guide/configuration.md
  • docs/en/dev/contribution.md
  • .github/ISSUE_TEMPLATE/feature_request.md
  • editors/vscode/.vscode/settings.json
  • README.md
  • docs/.vitepress/theme/sidebar.ts
  • editors/vscode/src/test/extension.test.ts
  • editors/vscode/src/download.ts
  • editors/vscode/webpack.config.js
  • docs/.vitepress/theme/index.ts
  • .github/ISSUE_TEMPLATE/bug_report.md
  • docs/.vitepress/theme/style.css
  • tombi.toml
  • editors/zed/Cargo.toml
  • editors/vscode/.vscode/tasks.json
  • editors/vscode/tsconfig.json
  • docs/en/dev/test-and-debug.md
  • docs/zh/index.md
  • docs/en/index.md
  • editors/vscode/src/feature/highlight.ts
🧰 Additional context used
🧬 Code graph analysis (4)
xmake.lua (1)
include/Test/Tester.h (1)
  • add_files (30-33)
editors/vscode/src/extension.ts (2)
editors/vscode/src/setting.ts (1)
  • getSetting (10-34)
editors/vscode/src/download.ts (1)
  • ensureServerBinary (17-144)
docs/.vitepress/config.ts (1)
docs/.vitepress/theme/sidebar.ts (1)
  • genSidebar (5-45)
editors/vscode/src/setting.ts (1)
tests/conftest.py (1)
  • executable (40-53)
🪛 markdownlint-cli2 (0.18.1)
docs/zh/dev/test-and-debug.md

75-75: Dollar signs used before commands without showing output

(MD014, commands-show-output)


76-76: Dollar signs used before commands without showing output

(MD014, commands-show-output)


77-77: Dollar signs used before commands without showing output

(MD014, commands-show-output)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: build (macos-15, releasedbg)
  • GitHub Check: build (windows-2025, releasedbg)
  • GitHub Check: build (macos-15, debug)
  • GitHub Check: build (ubuntu-24.04, releasedbg)
  • GitHub Check: build (ubuntu-24.04, debug)
  • GitHub Check: build (windows-2025, RelWithDebInfo)
  • GitHub Check: build (ubuntu-24.04, Debug)
  • GitHub Check: build (macos-15, Debug)
🔇 Additional comments (20)
docs/zh/dev/contribution.md (1)

9-12: LGTM!

Minor formatting improvement adding a blank line for better readability in the Code Style section.

editors/vscode/.vscode/launch.json (1)

5-17: LGTM!

Formatting-only changes to align with project-wide style consistency. The launch configuration remains functionally unchanged.

docs/en/guide/configuration.md (1)

38-38: LGTM!

Minor formatting adjustment for the <br> tag indentation.

tests/data/clang_tidy/clice.toml (2)

1-1: Verify the intended header format.

The header ## # clice configuration appears unusual for a TOML file. Typically, TOML comments use a single # prefix. Was this intended to be # clice configuration or is this a specific template format?


3-5: LGTM!

Good addition of a descriptive comment explaining the clang_tidy setting.

docs/zh/dev/test-and-debug.md (2)

54-66: LGTM!

The JSONC configuration block formatting is clean and readable with appropriate comments.


73-78: LGTM!

Formatting improvements to the shell command block.

Note: The static analysis tool flags the $ prefix (MD014), but this is a common convention in documentation to clearly indicate shell commands. The current style is acceptable.

docs/.vitepress/config.ts (1)

1-38: LGTM!

The VitePress configuration is well-structured with proper nesting of locales and themeConfig. The switch to double-quoted strings aligns with the project-wide formatting standardization. Functional behavior remains unchanged.

editors/vscode/src/setting.ts (1)

1-34: LGTM!

Formatting-only changes (double quotes, semicolons, spacing) for consistency with project style. The function logic and validation behavior remain unchanged.

xmake.lua (2)

148-151: Source paths successfully migrated to new locations.

The clice target correctly references src/clice.cc and unit_tests correctly references tests/unit/unit_tests.cc. Both new source files exist, and old paths have been removed.


173-177: Unit tests source path reorganization looks good.

Moving unit_tests.cc from bin/ to tests/unit/ provides better organization by keeping test files together. The tests/unit/**.cpp glob pattern correctly matches 45 test files across the organized subdirectories (AST, Async, Compiler, Feature, Index, Server, Support, Test).

editors/vscode/src/extension.ts (2)

1-11: LGTM!

The imports are well-organized with consistent double-quote formatting. The separation of named imports from vscode (line 3) alongside the namespace import (line 2) is a reasonable pattern for accessing both common utilities and the full API.


15-21: LGTM!

The activation flow, command registration, server option construction, and language client setup are well-structured. The conditional handling for pipe vs. socket modes with proper error messaging is clean, and the auto-download fallback via ensureServerBinary is a good UX improvement.

Also applies to: 23-86

.github/workflows/check-format.yml (1)

10-12: Permissions are correctly scoped.

The pull-requests: write permission is required for reviewdog to post inline suggestions, and contents: read follows the principle of least privilege.

docs/clice.toml (1)

11-26: LGTM!

The configuration is well-documented with clear comments explaining each option. The use of ${workspace} variable for paths and the catch-all **/* pattern for rules are appropriate defaults.

Also applies to: 30-47

editors/vscode/.eslintrc.json (1)

1-24: LGTM!

The ESLint configuration is well-structured. The pattern of disabling the base semi rule (line 21) while enabling @typescript-eslint/semi (line 17) is correct to avoid conflicts. The naming-convention rule for imports aligns with the double-quote and consistent styling applied across the extension files.

pixi.toml (3)

53-74: LGTM!

The formatting tasks are well-organized with clear separation by file type. Using fd for file discovery with appropriate extensions and exclusions (e.g., -E package-lock.json) is a good pattern. The format meta-task with depends-on provides a convenient single command to run all formatters.


81-85: LGTM!

The task definitions are well-structured with proper use of array-form commands for complex invocations. The CI tasks with proper dependency chains and the environment definitions are clean.

Also applies to: 87-99, 101-128, 130-154


45-51: No issue with clang-format version 21.1.7.

Version 21.1.7 is available in conda-forge and is a valid pin. No action required.

Likely an incorrect or invalid review comment.

.prettierrc.yaml (1)

1-23: LGTM!

The Prettier configuration is well-structured and aligns with the formatting changes across the PR. Key decisions are sound:

  • tabWidth: 4 for code files, tabWidth: 2 for config/data files
  • singleQuote: false matches the double-quote standardization in TypeScript files
  • Including .clang-format and .clang-tidy in YAML overrides correctly handles these YAML-based config files

Comment thread .github/workflows/check-format.yml Outdated
Comment thread editors/vscode/src/extension.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/check-format.yml (1)

41-47: Previous feedback addressed! Consider adjusting strictness settings.

The previous review concerns have been fully resolved—the action is now pinned to @v1.24.0 and uses fail_level instead of the deprecated fail_on_error.

However, you may want to consider whether fail_level: any and filter_mode: nofilter align with your team's workflow:

  • fail_level: any will fail the workflow on any suggestion (info, warning, or error), which is quite strict.
  • filter_mode: nofilter will show suggestions for the entire repository, not just changed files.

For a more lenient approach, consider fail_level: error and filter_mode: diff_context to fail only on errors and focus on changed files.

🔎 Alternative configuration for less strict checks
       - name: Suggest changes
         if: github.event_name == 'pull_request'
         uses: reviewdog/action-suggester@v1.24.0
         with:
           tool_name: "fmt"
-          fail_level: any
-          filter_mode: nofilter
+          fail_level: error
+          filter_mode: diff_context
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7f3850b and 14cccbc.

📒 Files selected for processing (3)
  • .coderabbit.yaml
  • .github/workflows/check-format.yml
  • .pre-commit-config.yaml
💤 Files with no reviewable changes (1)
  • .pre-commit-config.yaml
✅ Files skipped from review due to trivial changes (1)
  • .coderabbit.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: build (macos-15, debug)
  • GitHub Check: build (macos-15, releasedbg)
  • GitHub Check: build (ubuntu-24.04, debug)
  • GitHub Check: build (windows-2025, releasedbg)
  • GitHub Check: build (ubuntu-24.04, releasedbg)
  • GitHub Check: build (macos-15, Debug)
  • GitHub Check: build (windows-2025, RelWithDebInfo)
  • GitHub Check: build (ubuntu-24.04, Debug)
🔇 Additional comments (2)
.github/workflows/check-format.yml (2)

9-14: LGTM! Permissions follow least-privilege principle.

The permissions block correctly grants the minimum required rights for the reviewdog suggester and autocorrect actions to function properly.


31-47: Verify the interaction between continue-on-error and fail_level: any.

The workflow allows both the formatter (line 33) and autocorrect (line 39) steps to continue on error, but then the suggester (line 46) will fail the workflow on any suggestion. This pattern collects all formatting issues before failing, which is reasonable, but please confirm this is the intended behavior.

If you want the workflow to fail immediately when formatting tools encounter errors, remove continue-on-error: true from the earlier steps.

@16bit-ykiko 16bit-ykiko changed the title chore: format the world chore: use pixi to manage the format tools and format the world Dec 28, 2025
@16bit-ykiko 16bit-ykiko merged commit 7105e36 into main Dec 28, 2025
10 checks passed
@16bit-ykiko 16bit-ykiko deleted the update-build-docs branch December 28, 2025 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant