Skip to content

chore: move gitignore - #832

Merged
yxtay merged 2 commits into
mainfrom
chore/move-gitignore
Jun 19, 2026
Merged

chore: move gitignore#832
yxtay merged 2 commits into
mainfrom
chore/move-gitignore

Conversation

@yxtay

@yxtay yxtay commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

Release Notes

  • Chores
    • Simplified Git ignore configuration management by transitioning to local OS-specific patterns for macOS, Windows, and Linux.
    • Enhanced Firefox Homebrew installation with forced installation flag for improved reliability.
    • Platform-specific Git ignore patterns now automatically handle OS-specific temporary files and metadata.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yxtay, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 47 minutes and 17 seconds. Learn how PR review limits work.

To continue reviewing without waiting, enable usage-based billing in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 557612fa-cc14-45a2-85fc-96b1fe86f28b

📥 Commits

Reviewing files that changed from the base of the PR and between 4ba7e06 and a8a1e28.

📒 Files selected for processing (2)
  • chezmoi/.chezmoiscripts/run_before_brew_install.sh.tmpl
  • chezmoi/private_dot_config/git/ignore.tmpl
📝 Walkthrough

Walkthrough

Removes the .config/git/ignore entry from .chezmoiexternal.toml.tmpl (which previously fetched OS-specific ignore files from github/gitignore) and replaces it with a new local chezmoi template private_dot_config/git/ignore.tmpl containing inline OS-conditional patterns for macOS, Windows, and Linux. Also adds args: { force: true } to the Firefox Homebrew cask.

Changes

Git Ignore: External → Local Template

Layer / File(s) Summary
Remove external git ignore download
chezmoi/.chezmoiexternal.toml.tmpl
Deletes the .config/git/ignore external block that fetched OS-specific ignore files from github/gitignore, including all OS-branching URL logic.
Add local OS-conditional git ignore template
chezmoi/private_dot_config/git/ignore.tmpl
New 111-line template with macOS (darwin), Windows, and Linux/other fallback branches, each emitting the appropriate OS-specific ignore patterns. Unconditionally appends **/.claude/settings.local.json at the end.

Firefox Cask Force Install

Layer / File(s) Summary
Firefox cask args: { force: true }
chezmoi/.chezmoiscripts/run_before_brew_install.sh.tmpl
Adds args: { force: true } to the cask "firefox" entry in the Homebrew install script.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • yxtay/dotfiles#821: Also modifies run_before_brew_install.sh.tmpl with a firefox cask entry; this PR further updates that entry to add args: { force: true }.

Suggested labels

size/M

🐇 I hopped through the .gitignore patch,
No more fetching from GitHub's dispatch!
macOS, Windows, Linux in one file,
And Firefox now installs in style.
force: true — the rabbit's new trick! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: move gitignore' accurately describes the main change—relocating gitignore configuration from external management to a dedicated template file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/move-gitignore

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request replaces the external gitignore configuration with a local template file (chezmoi/private_dot_config/git/ignore.tmpl) and adds a force argument to the Firefox cask installation in the Homebrew script. The review feedback highlights two issues: first, Go templates do not support the elif keyword, which will cause a parsing error in the new gitignore template; second, forcing the installation of the Firefox cask will significantly slow down updates by reinstalling it on every run.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

MobileBackups.trash
tmbootpicker.efi

{{ elif eq .chezmoi.os "windows" -}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Go templates (used by chezmoi) do not support the elif keyword. You must use else if instead to avoid template parsing errors.

{{ else if eq .chezmoi.os "windows" -}}

cask "adguard"
cask "brave-browser"
cask "firefox"
cask "firefox", args: { force: true }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using args: { force: true } for firefox will cause Homebrew to reinstall Firefox every time brew bundle is executed. Since this script runs on every chezmoi apply, this will significantly slow down your updates. Consider removing args: { force: true } unless there is a specific, unavoidable reason to force reinstallation.

cask "firefox"

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ BASH shfmt 3 0 0 0 0.02s
✅ JSON prettier 1 0 0 0 0.4s
✅ MARKDOWN markdownlint 4 0 0 0 0.55s
✅ MARKDOWN markdown-table-formatter 4 0 0 0 0.16s
✅ YAML prettier 10 0 0 0 0.57s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters BASH_SHFMT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,YAML_PRETTIER

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ BASH shellcheck 3 0 0 0.36s
✅ BASH shfmt 3 0 0 0 0.02s
✅ COPYPASTE jscpd yes no no 0.89s
✅ JSON prettier 1 0 0 0 0.41s
✅ JSON v8r 1 0 0 2.22s
✅ REPOSITORY gitleaks yes no no 1.83s
✅ REPOSITORY git_diff yes no no 0.01s
✅ REPOSITORY grype yes no no 48.14s
⚠️ REPOSITORY osv-scanner yes 1 no 0.14s
✅ REPOSITORY secretlint yes no no 1.2s
✅ REPOSITORY syft yes no no 2.45s
✅ REPOSITORY trivy yes no no 10.55s
✅ REPOSITORY trivy-sbom yes no no 0.12s
✅ REPOSITORY trufflehog yes no no 4.32s
✅ YAML prettier 10 0 0 0 0.56s
✅ YAML v8r 10 0 0 7.85s
✅ YAML yamllint 10 0 0 0.72s

Detailed Issues

⚠️ REPOSITORY / osv-scanner - 1 error
Scanning dir .
Starting filesystem walk for root: /
End status: 46 dirs visited, 141 inodes visited, 0 Extract calls, 3.404563ms elapsed, 3.404754ms wall time
No package sources found, --help for usage information.

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters BASH_SHELLCHECK,BASH_SHFMT,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ BASH bash-exec 3 0 0 0.01s
✅ BASH shellcheck 3 0 0 0.11s
✅ REPOSITORY checkov yes no no 25.73s
✅ REPOSITORY devskim yes no no 1.75s
✅ REPOSITORY dustilock yes no no 0.02s
✅ REPOSITORY gitleaks yes no no 1.35s
✅ REPOSITORY grype yes no no 55.65s
✅ REPOSITORY kingfisher yes no no 7.31s
⚠️ REPOSITORY osv-scanner yes 1 no 0.12s
✅ REPOSITORY secretlint yes no no 1.65s
✅ REPOSITORY semgrep yes no no 25.81s
✅ REPOSITORY syft yes no no 2.06s
✅ REPOSITORY trivy yes no no 12.79s
✅ REPOSITORY trivy-sbom yes no no 0.19s
✅ REPOSITORY trufflehog yes no no 5.86s

Detailed Issues

⚠️ REPOSITORY / osv-scanner - 1 error
Scanning dir .
Starting filesystem walk for root: /
End status: 46 dirs visited, 141 inodes visited, 0 Extract calls, 2.652807ms elapsed, 2.652987ms wall time
No package sources found, --help for usage information.

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters BASH_EXEC,BASH_SHELLCHECK,REPOSITORY_CHECKOV,REPOSITORY_DEVSKIM,REPOSITORY_DUSTILOCK,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SEMGREP,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,REPOSITORY_KINGFISHER

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.34s
✅ ACTION zizmor 5 0 0 0 0.75s
✅ BASH bash-exec 3 0 0 0.01s
✅ BASH shellcheck 3 0 0 0.1s
✅ BASH shfmt 3 0 0 0 0.02s
✅ COPYPASTE jscpd yes no no 0.76s
✅ EDITORCONFIG editorconfig-checker 60 0 0 0.06s
✅ JSON prettier 1 0 0 0 0.34s
✅ JSON v8r 1 0 0 2.22s
✅ MARKDOWN markdownlint 4 0 0 0 0.77s
✅ MARKDOWN markdown-table-formatter 4 0 0 0 0.19s
✅ REPOSITORY checkov yes no no 28.0s
✅ REPOSITORY gitleaks yes no no 1.47s
✅ REPOSITORY git_diff yes no no 0.01s
✅ REPOSITORY grype yes no no 58.17s
⚠️ REPOSITORY osv-scanner yes 1 no 0.16s
✅ REPOSITORY secretlint yes no no 1.21s
✅ REPOSITORY semgrep yes no no 27.0s
✅ REPOSITORY syft yes no no 1.9s
✅ REPOSITORY trivy yes no no 13.69s
✅ REPOSITORY trivy-sbom yes no no 0.25s
✅ REPOSITORY trufflehog yes no no 4.83s
✅ SPELL lychee 17 0 0 1.22s
✅ YAML prettier 10 0 0 0 0.6s
✅ YAML v8r 10 0 0 7.93s
✅ YAML yamllint 10 0 0 0.42s

Detailed Issues

⚠️ REPOSITORY / osv-scanner - 1 error
Scanning dir .
Starting filesystem walk for root: /
End status: 46 dirs visited, 141 inodes visited, 0 Extract calls, 3.270138ms elapsed, 3.270317ms wall time
No package sources found, --help for usage information.

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,ACTION_ZIZMOR,BASH_EXEC,BASH_SHELLCHECK,BASH_SHFMT,COPYPASTE_JSCPD,EDITORCONFIG_EDITORCONFIG_CHECKER,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SEMGREP,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@chezmoi/private_dot_config/git/ignore.tmpl`:
- Line 63: The chezmoi template at line 63 uses an invalid `elif` keyword which
is not supported in Go templates and causes template rendering to fail. Replace
the `elif` construct with `else if` in the conditional statement that checks eq
.chezmoi.os "windows" to use the correct Go template syntax for conditional
chaining.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8d18f8df-1147-4aa2-bfae-57806cf29ad9

📥 Commits

Reviewing files that changed from the base of the PR and between 17e3d01 and 4ba7e06.

📒 Files selected for processing (3)
  • chezmoi/.chezmoiexternal.toml.tmpl
  • chezmoi/.chezmoiscripts/run_before_brew_install.sh.tmpl
  • chezmoi/private_dot_config/git/ignore.tmpl
💤 Files with no reviewable changes (1)
  • chezmoi/.chezmoiexternal.toml.tmpl

Comment thread chezmoi/private_dot_config/git/ignore.tmpl Outdated
@yxtay
yxtay merged commit 63b1521 into main Jun 19, 2026
32 checks passed
@yxtay
yxtay deleted the chore/move-gitignore branch June 19, 2026 03:54
This was referenced Jul 2, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant