cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

pre-commit: fix `.cs` files with the `trailing-whitespace` hook

Open jbampton opened this issue 1 year ago • 4 comments

Description

This PR adds .cs files to the trailing-whitespace pre-commit hook.

This hook auto fixes and removes trailing whitespace when run locally on a users machine.

On the GitHub CI it just runs either pass or fail for now.

Types of changes

  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] Enhancement (improves an existing feature and functionality)
  • [X] Cleanup (Code refactoring and cleanup, that may add test cases)
  • [ ] build/CI
  • [ ] test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [ ] Major
  • [ ] Minor

Bug Severity

  • [ ] BLOCKER
  • [ ] Critical
  • [ ] Major
  • [ ] Minor
  • [ ] Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Ran locally: pre-commit run --all-files

How did you try to break this feature and the system with this change?

jbampton avatar Oct 14 '24 15:10 jbampton

@blueorangutan package

jbampton avatar Oct 14 '24 16:10 jbampton

@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.

blueorangutan avatar Oct 14 '24 16:10 blueorangutan

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 16.07%. Comparing base (0b66f5a) to head (2bfe8b7). Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9794   +/-   ##
=========================================
  Coverage     16.07%   16.07%           
  Complexity    12885    12885           
=========================================
  Files          5642     5642           
  Lines        494039   494039           
  Branches      59912    59912           
=========================================
+ Hits          79406    79408    +2     
+ Misses       405829   405828    -1     
+ Partials       8804     8803    -1     
Flag Coverage Δ
uitests 4.01% <ø> (ø)
unittests 16.91% <ø> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 14 '24 16:10 codecov[bot]

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11341

blueorangutan avatar Oct 14 '24 17:10 blueorangutan

@blueorangutan package

jbampton avatar Dec 20 '24 22:12 jbampton

@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.

blueorangutan avatar Dec 20 '24 22:12 blueorangutan

Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 11872

blueorangutan avatar Dec 20 '24 23:12 blueorangutan

@blueorangutan package

vishesh92 avatar Dec 26 '24 07:12 vishesh92

@vishesh92 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.

blueorangutan avatar Dec 26 '24 07:12 blueorangutan

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11911

blueorangutan avatar Dec 26 '24 08:12 blueorangutan

Hey @DaanHoogland we are using the official pre-commit hook trailing-whitespace:

https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#trailing-whitespace

This hook is an auto fixer and finds and removes all the trailing whitespace from the files/file types that are checked.

jbampton avatar Dec 28 '24 06:12 jbampton

@blueorangutan package

vishesh92 avatar Dec 31 '24 09:12 vishesh92

@vishesh92 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.

blueorangutan avatar Dec 31 '24 09:12 blueorangutan

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11957

blueorangutan avatar Dec 31 '24 10:12 blueorangutan

@vishesh92 , I don't see a reason to run any tests (other than GHA) on this one, agree?

DaanHoogland avatar Dec 31 '24 12:12 DaanHoogland

@vishesh92 , I don't see a reason to run any tests (other than GHA) on this one, agree?

I agree

vishesh92 avatar Dec 31 '24 12:12 vishesh92