Standardize and auto add license headers for Shell files with pre-commit#12070
Standardize and auto add license headers for Shell files with pre-commit#12070DaanHoogland merged 3 commits intoapache:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12070 +/- ##
=========================================
Coverage 17.56% 17.56%
- Complexity 15539 15540 +1
=========================================
Files 5911 5911
Lines 529359 529359
Branches 64655 64655
=========================================
+ Hits 92979 92983 +4
+ Misses 425920 425918 -2
+ Partials 10460 10458 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@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]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15758 |
There was a problem hiding this comment.
Pull Request Overview
This PR standardizes Apache License headers across Shell files in the CloudStack repository by adding a pre-commit hook that automatically inserts properly formatted license headers. The changes ensure consistent formatting with a blank line after the shebang, followed by the license header, and another blank line before any additional comments or code.
- Adds a new pre-commit hook configuration for automatically adding license headers to Shell files
- Reformats existing license headers in Shell scripts to use consistent single-hash comment style
- Moves file-specific usage comments to appear after the license header
Reviewed Changes
Copilot reviewed 6 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .pre-commit-config.yaml | Adds new insert-license hook for Shell files using # comment style |
| tools/devcloud4/common/configure-network.sh | Standardizes license header formatting and moves usage comment after license |
| systemvm/debian/opt/cloud/bin/prepare_pxe.sh | Removes extra hash characters and standardizes spacing in license header |
| systemvm/debian/opt/cloud/bin/dnsmasq.sh | Adds blank line after shebang and completes missing license header line |
| systemvm/debian/opt/cloud/bin/baremetal_snat.sh | Standardizes license header from no-space format to proper spacing |
| scripts/vm/hypervisor/kvm/nsrkvmrestore.sh | Converts double-hash to single-hash comment style and adds blank line |
| scripts/vm/hypervisor/kvm/nsrkvmbackup.sh | Converts double-hash to single-hash comment style and adds blank line |
| scripts/vm/hypervisor/kvm/nasbackup.sh | Converts double-hash to single-hash comment style and adds blank line |
| plugins/hypervisors/ovm3/src/test/resources/scripts/tail.sh | Standardizes license header with proper spacing |
| plugins/hypervisors/ovm3/src/test/resources/scripts/socat.sh | Standardizes license header with proper spacing |
| plugins/hypervisors/hyperv/buildagent.sh | Standardizes license header formatting and adds blank lines |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…mit (apache#12070) * Add shebang to shell scripts
Description
This PR...
refs #12069
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
With pre-commit
How did you try to break this feature and the system with this change?