-
Notifications
You must be signed in to change notification settings - Fork 9
ci: Add pre-commit
#201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Add pre-commit
#201
Conversation
|
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 130 files out of 237 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
56190e2 to
8bcd6db
Compare
* Add pre-commit infrastructure * Remove all steps in `rust.yml` which are now covered by `pre-commit` * Fix `trailing-whitespace` checks * Fix `end-of-file-fixer` checks * Fix `check-executables-have-shebangs` checks * Fix `check-shebang-scripts-are-executable` checks * Fix actionlint * Fix `typos` checks * Fix `clippy-workspace` checks * Fix `verify-ffi-docs` * Revert intentional typo fix for testing * Remove the redundant format/linting section in `CONTRIBUTING.md` * Change `id` from `clippy-workspace` to `clippy` * Fix `verify FFI` stage
This fixes a bunch of memory leaks in tests detected by sanitizer in CI overhaul PR dashpay#201. - Properly keep track of all create wallets and wallet infos and clean them up at the end. - Head allocate wallet infos like it would happen in real FFI usage and free them properly at the end.
This fixes a bunch of memory leaks in tests detected by sanitizer in CI overhaul PR dashpay#201. - Modified `set_error`, `set_success`, and `ffi_error_set` macro to free previous error messages before setting new ones - Added `FFIError::free_message` helper for test cleanup - Added cleanup in all relevalt tests
This fixes a bunch of memory leaks in tests detected by sanitizer in CI overhaul PR dashpay#201. - Properly keep track of all create wallets and wallet infos and clean them up at the end. - Head allocate wallet infos like it would happen in real FFI usage and free them properly at the end.
This fixes a bunch of memory leaks in tests detected by sanitizer in CI overhaul PR dashpay#201. - Modified `set_error`, `set_success`, and `ffi_error_set` macro to free previous error messages before setting new ones - Added `FFIError::free_message` helper for test cleanup - Added cleanup in all relevalt tests
This fixes a bunch of memory leaks in tests detected by sanitizer in CI overhaul PR dashpay#201. - Properly keep track of all create wallets and wallet infos and clean them up at the end. - Head allocate wallet infos like it would happen in real FFI usage and free them properly at the end.
This fixes a bunch of memory leaks in tests detected by sanitizer in CI overhaul PR dashpay#201. - Modified `set_error`, `set_success`, and `ffi_error_set` macro to free previous error messages before setting new ones - Added `FFIError::free_message` helper for test cleanup - Added cleanup in all relevalt tests
This fixes a bunch of memory leaks in tests detected by sanitizer in CI overhaul PR dashpay#201. - Properly keep track of all create wallets and wallet infos and clean them up at the end. - Head allocate wallet infos like it would happen in real FFI usage and free them properly at the end.
This fixes a bunch of memory leaks in tests detected by sanitizer in CI overhaul PR dashpay#201. - Modified `set_error`, `set_success`, and `ffi_error_set` macro to free previous error messages before setting new ones - Added `FFIError::free_message` helper for test cleanup - Added cleanup in all relevalt tests
This fixes a bunch of memory leaks in tests detected by sanitizer in CI overhaul PR dashpay#201. - Properly keep track of all create wallets and wallet infos and clean them up at the end. - Head allocate wallet infos like it would happen in real FFI usage and free them properly at the end.
This fixes a bunch of memory leaks in tests detected by sanitizer in CI overhaul PR dashpay#201. - Modified `set_error`, `set_success`, and `ffi_error_set` macro to free previous error messages before setting new ones - Added `FFIError::free_message` helper for test cleanup - Added cleanup in all relevalt tests
This PR adds https://pre-commit.com to the project which is a framework that runs automated checks on your code before you commit or push to help catching issues before they hit the CI. The same checks will also run in the CI via the integrated pre-commit github workflow.
This should be reviewed commit by commit since its pretty big PR mainly because of c422499 which fixes 2000 lines of trailing whitespaces. The first commit introduces all the infrastructure, the second cleans up all the github workflow steps which are now consolidated in the pre-commit config and the other commits just fix up one pre-commit stage per commit to get all of them to pass.
With
pre commithooks installedSee https://github.com/dashpay/rust-dashcore/blob/3543d2386f1385d1cf62d1fcf9863c94553f1356/CONTRIBUTING.md#pre-commit-hooks
When commiting:
When pushing:
If something fails, the commit/push is blocked and you'll see what needs fixing while most things get auto generated via the check run.