pre-commit: add hook to trim trailing whitespace#8205
pre-commit: add hook to trim trailing whitespace#8205DaanHoogland merged 5 commits intoapache:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8205 +/- ##
=========================================
Coverage 31.15% 31.16%
- Complexity 34034 34041 +7
=========================================
Files 5404 5404
Lines 380305 380305
Branches 55506 55506
=========================================
+ Hits 118502 118524 +22
+ Misses 246105 246077 -28
- Partials 15698 15704 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
DaanHoogland
left a comment
There was a problem hiding this comment.
looks generally good to me. Just to be clear and prevent confusion @jbampton , this is just a check and not a pre-commit corrective edit this hook is doing right?
|
Hey @DaanHoogland when the hook runs on GitHub with actions it is just a check that will either pass or fail. But when pre-commit is setup locally and run this hook will also automatically trim trailing whitespace. So yes it is a corrective edit. So all these whitespace clean ups were done automatically by the hook. |
|
@blueorangutan package |
|
@jbampton a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9015 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8205 +/- ##
==========================================
Coverage 15.28% 15.28%
- Complexity 11535 11536 +1
==========================================
Files 5425 5425
Lines 474138 474138
Branches 58984 59503 +519
==========================================
+ Hits 72486 72492 +6
+ Misses 393584 393578 -6
Partials 8068 8068
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
@blueorangutan package |
|
@blueorangutan package |
|
@jbampton a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9599 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-10214) |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-10245)
|
https://github.com/pre-commit/pre-commit-hooks#trailing-whitespace
Description
This PR adds another hook or test to our pre-commit framework.
This hook automatically trims trailing whitespace when run locally.
Follow up PRs can target more file types if needed.
Extra unneeded whitespace is extra data. Save the planet :)
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
pre-commit run --all-filesor
pre-commit run trailing-whitespace --all-filesHow did you try to break this feature and the system with this change?