Optimize .gitattributes for smaller dist, delete non-existent files#73
Conversation
Signed-off-by: Vladimir Plakhotnikov <embargo2710@gmail.com>
WalkthroughThe Changes
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.gitattributes (1)
1-2: Use explicit directory patterns for clarity.Omitting leading slashes works, but it’s more readable and less error-prone to append a trailing slash on directory patterns so Git knows you mean the directory itself. For example:
-.github export-ignore -tests export-ignore +.github/ export-ignore +tests/ export-ignoreAlso, confirm that removing
example/andgenerated/from the export-ignore list is intentional—those directories will now be included in archive exports unless they no longer exist.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
.gitattributes(1 hunks)
🔇 Additional comments (1)
.gitattributes (1)
6-7:Details
✅ Verification successful
Verify the presence of newly ignored files.
You added
.styleci.yml,codecov.yml, andpsalm.xmlto theexport-ignorelist. Double-check that these files actually exist at the repository root; if they don’t, the patterns won’t match anything.Also applies to: 9-9
🏁 Script executed:
#!/bin/bash for f in .styleci.yml codecov.yml psalm.xml; do if [[ ! -e "$f" ]]; then echo "Missing: $f" exit 1 fi done echo "✅ All files exist"Length of output: 256
Verified: Ignored files exist
The.styleci.yml,codecov.yml, andpsalm.xmlfiles are all present at the repository root, so theexport-ignoreentries in.gitattributeswill match as intended.
Signed-off-by: Vladimir Plakhotnikov <embargo2710@gmail.com>
Signed-off-by: Vladimir Plakhotnikov <embargo2710@gmail.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.gitattributes (3)
3-3: Verify hidden file export-ignore scope or broaden if needed.The
/.* export-ignorepattern cleanly replaces multiple explicit entries by excluding all hidden files and directories at the repository root. Note it only applies to top-level hidden items; if you need to ignore hidden files in subdirectories as well, consider using**/.* export-ignore.
5-5: Consider adding support for.yamlfiles.You currently ignore only
*.ymlat the root. If your project also includes*.yamlconfigurations, you may want to add:/*.yaml export-ignoreto prevent those from being packaged.
6-6: Optional: consolidate extension patterns.For brevity and easier maintenance, you could merge multiple root-level extension ignores into a single brace-expansion pattern, for example:
/*.{yml,yaml,xml} export-ignoreThis reduces repetition while achieving the same effect.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
.gitattributes(1 hunks)
🔇 Additional comments (2)
.gitattributes (2)
1-1: Automatic text normalization is correctly enabled.The
* text=autodirective applies Git’s end-of-line normalization to all files, ensuring consistent line endings across platforms—a recommended best practice.
4-4: Tests directory export-ignore is correctly specified.Using
/tests/ export-ignorewith a trailing slash ensures the entire tests directory is excluded from the distribution archive, which aligns with the goal of shrinking the package.
Maybe i will do it in new PR? |
Up to you |
Signed-off-by: Vladimir Plakhotnikov <embargo2710@gmail.com>
Summary by CodeRabbit