Skip to content

Conversation

@XuehaiPan
Copy link
Collaborator

@XuehaiPan XuehaiPan commented Oct 22, 2025

Resolves #1099

Summary by CodeRabbit

  • Chores
    • Improved uncommitted-changes check to be more precise (excludes submodules and untracked files)
    • Removed automatic initialization of pre-commit hooks
    • Minor script robustness tweaks (safer argument handling and clearer error messaging)

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 22, 2025

Walkthrough

Refined format.sh's uncommitted-change detection to ignore submodules and untracked files, quoted the case argument, and removed the automatic pre-commit hook installation/initialization block.

Changes

Cohort / File(s) Summary
Git status tightening & hook removal
format.sh
Use git status --porcelain --ignore-submodules --untracked-files=no to detect uncommitted changes; quote case "$1"; removed automatic pre-commit hook installation/initialization block and related messages.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User as Developer (runs format.sh)
    participant Script as format.sh
    participant Git as git
    participant PreCommit as pre-commit (hooks)

    User->>Script: execute ./format.sh
    Script->>Git: git status --porcelain --ignore-submodules --untracked-files=no
    alt changes detected
        Git-->>Script: non-empty output
        Script-->>User: "Detected uncommitted changes..." (exit)
    else no changes
        Git-->>Script: empty output
        Script->>PreCommit: (no automatic install/init) — proceed with formatting steps
        Script-->>User: run format/lint commands
    end
    Note over Script,PreCommit: pre-commit is no longer auto-initialized by this script
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Poem

🐰 I hopped into a script one night,

Whisked untracked leaves from git's sight,
Quoted my cases, skipped auto-try,
Clean and light I bounce on by. ✨

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "[Maint] Update uncommitted change detection command in format.sh" accurately and specifically describes the primary change in this pull request. According to the raw summary, the main modification is updating the uncommitted changes check to use git status --porcelain --ignore-submodules --untracked-files=no. The title directly reflects this core objective and is concise, clear, and specific enough for someone scanning the repository history to understand the purpose of the change.
Out of Scope Changes Check ✅ Passed The primary code change—updating the uncommitted changes detection command—directly addresses the requirements in linked issue #1099. The pull request also includes two secondary modifications: normalizing the case statement pattern with proper quoting and removing the pre-commit auto-initialization block. While these secondary changes are relatively minor maintenance improvements to the same script file, the removal of pre-commit auto-initialization is not explicitly mentioned in the linked issue and could arguably represent a separate concern from the core bug fix.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e5cf7b5 and 2639c36.

📒 Files selected for processing (1)
  • format.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • format.sh

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.

@github-actions
Copy link

👋 Hi! Thank you for contributing to the TileLang project.

Please remember to run pre-commit run --all-files in the root directory of the project to ensure your changes are properly linted and formatted. This will help ensure your contribution passes the format check.

We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀

@LeiWang1999 LeiWang1999 requested a review from tzj-fxz October 22, 2025 12:25
@tzj-fxz tzj-fxz merged commit e28433e into tile-ai:main Oct 22, 2025
6 checks passed
@XuehaiPan XuehaiPan deleted the fix-format-sh branch October 22, 2025 15:40
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.

[Question][BUG] How to use new format.sh

2 participants