-
Notifications
You must be signed in to change notification settings - Fork 0
FAQ
Q: How do I install Clean BOM Senior?
A: Download the script, make it executable, and run it. See Quick Start Guide.
Q: Do I need to install dependencies?
A: No, it's a standalone Bash script. Only needs Linux/macOS/WSL.
Q: How do I update to a newer version?
A: Re-download the script from GitHub.
Q: Can I use it on Windows?
A: Yes, use WSL, Git Bash, or Cygwin.
Q: What's the simplest way to use it?
A: ./clean-bom-senior.sh /path/to/files
Q: Do I need to backup files first?
A: Recommended for first time. Use --backup flag.
Q: Can I undo changes?
A: Yes, restore .bak files or use git checkout -- .
Q: How long does it take?
A: Processes 1000+ files/sec depending on disk speed.
Q: Can it clean a single file?
A: Yes, pass the file path instead of directory.
Q: What exactly is BOM?
A: Byte Order Mark - invisible characters (EF BB BF) at file start. See Understanding BOM and CRLF.
Q: Why is BOM bad?
A: Breaks PHP headers, JSON parsing, shell scripts, CSV imports.
Q: Can BOM exist without being detected?
A: No, the script detects all standard BOM types.
Q: What if my file has multiple BOMs?
A: Script removes all from start.
Q: Can BOM appear in middle of file?
A: No, only at the beginning.
Q: How many file types does it support?
A: 50+ including PHP, Python, JavaScript, JSON, YAML, HTML, etc. See File Types and Detection.
Q: Will it clean binary files?
A: No, automatically detects and skips binary.
Q: Can I clean only PHP files?
A: Yes, use --file-type php /path
Q: What about template files?
A: Supports Blade, Twig, ERB, Mustache, Handlebars.
Q: Can I add custom file types?
A: Yes, edit the script configuration section.
Q: What does --dry-run do?
A: Shows what would change without modifying files. Safe to use first.
Q: Should I always use --dry-run first?
A: Yes, recommended for safety.
Q: What does --backup do?
A: Creates .bak copies of original files.
Q: How do I exclude directories?
A: --exclude vendor,node_modules /path
Q: What's --fix-crlf?
A: Converts Windows line endings (CRLF) to Unix (LF).
Q: Can I combine multiple flags?
A: Yes! --dry-run --verbose --exclude vendor /path
Q: Is it fast?
A: Yes, 1000+ files/sec on modern hardware.
Q: How do I speed it up?
A: Exclude vendor/node_modules: --exclude vendor,node_modules /path
Q: Should I use --verbose?
A: Optional, slows it slightly but shows progress.
Q: Can it handle large directories?
A: Yes, tested with 100,000+ files.
Q: Why does Git show all files modified?
A: Probably CRLF line endings. Use --fix-crlf
Q: How do I prevent future BOM issues?
A: Add to .gitattributes: * text eol=lf
Q: Should I commit the script?
A: Optional, but good for team consistency.
Q: Can I use it in CI/CD?
A: Yes! See CI/CD Integration Guide
Q: Nothing happens when I run it?
A: Use --verbose to see what's happening. Check path exists.
Q: Permission denied error?
A: Make script executable: chmod +x clean-bom-senior.sh
Q: BOM still there after cleaning?
A: Run again with --verbose to debug.
Q: How do I report a bug?
A: GitHub Issues: https://github.com/paulmann/Clean_BOM_Senior/issues
Q: Can I modify the script?
A: Yes, it's open source. Fork and customize as needed.
Q: Can I use it in a pre-commit hook?
A: Yes, see CI/CD Integration Guide
Q: How do I generate reports?
A: Use --report filename.txt --verbose /path
Q: Can it fix corrupted files?
A: No, it only removes BOM. See Troubleshooting Guide for help.
Q: Where do I get help?
A: Check Troubleshooting Guide and this FAQ first.
Q: Is there commercial support?
A: This is free open source. Community support available.
More questions? Check the full documentation or create an issue on GitHub.