-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Checklist
- I have verified this is the correct repository for opening this issue.
- I have verified no other issues exist related to my request.
Is Your Feature Request Related To A Problem? Please describe.
Currently, the CPMR0061 rule flags .hook packages as invalid due to an unrecognized suffix. This results in false positives during compliance checks for packages that legitimately include .hook packages as part of their dependency set or tooling. The rule does not recognize .hook as a valid and intentional suffix, despite Chocolatey CLI having built-in support for this package type.
Describe The Solution. Why is it needed?
Update the CPMR0061 rule to include .hook as a valid suffix. This change would prevent valid .hook packages from being incorrectly flagged during validation, and would align compliance rules with the Chocolatey CLI's native support for .hook packages, which are executed before or after install, before modify, and during uninstall operations.
Additional Context
Chocolatey CLI has built-in functionality to detect and run .hook packages at specific lifecycle stages, such as before install, after install, before modify, and during uninstall. These packages are a supported and documented feature of the Chocolatey ecosystem.
In addition to updating the CPMR0061 rule, the Package Validator project should also be updated to recognize .hook as a valid suffix, ensuring consistency across the validation pipeline and alignment with CLI behavior.