PSRule icon indicating copy to clipboard operation
PSRule copied to clipboard

Improve version expression reason

Open BernieWhite opened this issue 1 year ago • 0 comments

For the case:

field: properties.grafanaMajorVersion
version: '>=10'

The outputted reason is Path properties.grafanaMajorVersion: The version '9.-1.-1' does not match the constraint 'PSRule.Data.SemanticVersion+VersionConstraint'.

This could be improved by:

  • Handling the -1 when the value is just 9 instead of 9.0.0.
  • Fix the string formatting for the constraint.

Example case: https://github.com/Azure/PSRule.Rules.Azure/pull/2883

BernieWhite avatar May 24 '24 05:05 BernieWhite