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

(#35) Implement note rule CPMR0062 #46

Closed AdmiringWorm closed 2 months ago

AdmiringWorm commented 2 months ago

Description Of Changes

This implements the note rule CPMR0062 - Chocolatey Dependency, which checks if there is a dependency on Chocolatey CLI defined in the nuspec file.

Motivation and Context

This is checked as normally there is no need to define Chocolatey CLI as a dependency, unless a specific feature is being used. As such, it is considered to be an anti-pattern to define one.

Testing

  1. Create a new nuspec file.
  2. Add a dependency on the package chocolatey in the nuspec file
  3. Attempt to run choco pack on the nuspec file.
  4. Ensure a informational message about the rule CPMR0062 is shown.

Operating Systems Testing

Change Types Made

Change Checklist

Related Issue

Fixes #35

corbob commented 2 months ago

Thanks for getting this added @AdmiringWorm 👍