chocolatey / package-validator

Windows service to validate packages conform to package standards
Apache License 2.0
31 stars 29 forks source link

InstallScriptsNamedCorrectlyRequirement should not get triggered by chocolateyUninstall.ps1 #178

Open jberezanski opened 6 years ago

jberezanski commented 6 years ago

There are some packages which only need uninstall scripts. One such package is the visualstudio2017-installer package. Quoting from moderation discussion:

This package does not use an install script, only an uninstall one. The VS Installer is installed by the first installed VS product package (e.g. visualstudio2017professional) and shared by all subsequently installed VS products. This package is used to remove the VS Installer once all VS products are removed.

However, the package validator reports a violation of InstallScriptsNamedCorrectlyRequirement:

The install script should be named chocolateyInstall.ps1 and be found in the tools folder. Your script is named incorrectly and will need to be renamed.

I believe the rule should skip chocolateyUninstall.ps1.