Draft: Add lefthook for backend and code style checking to gitlab-backup-cli
What does this MR do and why?
This MR introduces lefthook
to the gitlab-backup-cli
gem based on the lefthook
setup for the gitlab
rails project without he frontend, database or documentation checks, since we don't need them for this gem.
The code changes introduce a series of pre-push and pre-commit hooks to ensure code quality and security. These hooks include checks for merge conflicts, security branch restrictions, code style and formatting, secrets detection, and more. Additionally, it enables auto-fix capabilities for certain issues, such as JSON and Ruby code formatting. These changes enhance the development workflow by automating code quality checks and providing real-time feedback to developers, ultimately leading to a more polished and secure codebase.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.