Starting from version v1.0.0, cpp-linter-hooks has migrated from using the clang-tools package to using Python wheel packages for clang-format and clang-tidy. This change provides:
- Better cross-platform compatibility
- Easier installation and dependency management
- Improved performance and reliability
- More predictable version management
| Aspect | Before (< v1.0.0) | After (≥ v1.0.0) |
|---|---|---|
| Installation | clang-tools package (binary management) |
Python wheel packages (clang-format, clang-tidy) |
| Distribution | Single package for both tools | Separate packages for each tool |
| Version Control | Limited version flexibility | Enhanced version management with pip |
| Performance | Standard performance | Optimized wheel packages |
- Dependencies: Updated to use separate
clang-format==20.1.7andclang-tidy==20.1.0Python wheels - Installation Logic: Enhanced with pip-based installation and runtime version checks
- Performance: Pre-commit hooks can now run in parallel for better speed
No breaking changes for end users
- Your existing
.pre-commit-config.yamlfiles will continue to work without modification - All hook configurations remain backward compatible
- No changes required to your workflow
No action required! Your existing configuration will continue to work seamlessly.
However, we recommend updating to the latest version for:
- Better performance
- Enhanced reliability
- Latest features and bug fixes
repos:
- repo: https://github.com/cpp-linter/cpp-linter-hooks
rev: v1.0.0 # Use the latest version
hooks:
- id: clang-format
args: [--style=Google]
- id: clang-tidy
args: [--checks=-*,readability-*]Solution: Clear your pre-commit cache:
pre-commit clean
pre-commit installSolution: Ensure you're using the latest version of cpp-linter-hooks:
rev: v1.0.0 # Update to latest versionIf you encounter issues after migration:
- Check this guide: Review the troubleshooting section above
- Search existing issues: GitHub Issues
- Report new issues: Include the following information:
- Operating system and version
- Python version
cpp-linter-hooksversion- Complete error message/stack trace
- Your
.pre-commit-config.yamlconfiguration
- clang-format Python wheel - PyPI package
- clang-tidy Python wheel - PyPI package
- clang-format wheel source - GitHub repository
- clang-tidy wheel source - GitHub repository
- cpp-linter-hooks Documentation - Main repository
- Pre-commit Framework - Pre-commit documentation
Happy linting!