chocolatey-community / chocolatey-community-validation

Chocolatey CLI extension to bring community package validation rules to the console
Apache License 2.0
1 stars 4 forks source link

CPMR0001 implementation more strict than package validator. #31

Closed TheCakeIsNaOH closed 6 months ago

TheCakeIsNaOH commented 6 months ago

Checklist

What You Are Seeing?

When trying to pack a package with an empty checksum element, the CPMR0001 rule get triggered. This does not happen for packages going through the validator.

What is Expected?

That packages with an empty checksum element do not fail CPMR0001, to be consistent with the validator behavior. https://community.chocolatey.org/packages/libreoffice-fresh

How Did You Get This To Happen?

  1. Get the source libreoffice-fresh at https://github.com/chocolatey-community/chocolatey-packages/tree/master/automatic/libreoffice-streams
  2. Run choco pack in the directory
  3. See that pack fails with CPMR0001

System Details

Installed Packages

Not applicable.

Output Log

https://gist.github.com/TheCakeIsNaOH/8dda18d47a98ebabeae24058ba1d21b1

Additional Context

No response

AdmiringWorm commented 6 months ago

It is intentional that the rule is stricter than the implementation in package validator. In this, we are taking what the rule description is specified as, instead of doing a 1-to-1 like of the implementation in package validator. If it had been the other way around, that this extension wouldn't have flagged the empty Copyright element, but the package validator had flagged it, this would have been a bug.