🔧 add husky and license check - #435
Open
sebastianMindee wants to merge 4 commits into
Open
Conversation
sebastianMindee
requested review from
ianardee
and
a lite review from Copilot
September 3, 2026 15:47
There was a problem hiding this comment.
🟡 Changes recommended
The pre-commit format task currently runs with --no-restore before any restore occurs, and the license-check script should fail fast with a clearer message when dotnet-delice isn’t available.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR introduces local Git hooks via Husky.Net and adds an automated dependency license whitelist check, aligning local developer workflows with the repository’s CI checks.
Changes:
- Add Husky.Net hook entrypoints and task-runner configuration for pre-commit (format/build) and pre-push (license check/unit tests).
- Add a
dotnet-delice-based license whitelist check and run it in CI static analysis. - Add a local tool manifest (
.config/dotnet-tools.json) and ignoredotnet-delice’s generatedlicenses.json.
File summaries
| File | Description |
|---|---|
| .husky/task-runner.json | Defines Husky.Net tasks for formatting, build, license checking, and unit tests. |
| .husky/run-unit-tests.sh | Runs unit tests across supported TFMs depending on OS. |
| .husky/pre-push | Husky hook entrypoint to run the pre-push task group. |
| .husky/pre-commit | Husky hook entrypoint to run the pre-commit task group. |
| .husky/licenses.allowed-packages | Per-package allowlist exceptions for license detection gaps. |
| .husky/licenses.allowed | Allowlist of accepted license expressions. |
| .husky/check-licenses.sh | Implements the dotnet delice + whitelist license enforcement. |
| .gitignore | Ignores generated licenses.json output from dotnet-delice. |
| .github/workflows/_static-analysis.yml | Restores local tools and runs the license check in CI. |
| .config/dotnet-tools.json | Adds local tool definitions (husky, dotnet-delice, mindee CLI). |
Review details
- Files reviewed: 9/10 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Types of changes