atomist-attic / rug

DEPRECATED Runtime for Rugs
GNU General Public License v3.0
53 stars 13 forks source link

Restore leniency on default values that aren't valid #621

Closed jessitron closed 7 years ago

jessitron commented 7 years ago

In the last release of Rug, it was ok for parameters to default to "" even if they have a minLength of 1 (and required: true).

That isn't true in master now. Which makes atomist:rug-rugs not compile. Very not-backward-compatible.

This makes it true again. It prints a warning:

Loading rugs of atomist:rug-rugs (0.31.0-20170524133032·zip) completed
  WARNING: On rug AddLicense, parameter 'include' has a default value of '', but that is not a valid value for this parameter. Set the parameter to null instead, please.

FYI, the error when I try to load atomist:rug-rugs on master before this change is:

Initializing shell for atomist:rug-rugs (0.31.0-20170524133032·zip) failed

Parameter include default value () is not valid: Parameter{name='include', description='if provided, editor will only add license headers to *.ts files under specified paths, e.g., "typescript/src,typescript/test"', defaultValue='', defaultRef='null', pattern='^[\s\S]*$', validInputDescription='a comma separated list of paths to search', required=false, displayable=true, tags=ListBuffer(), maxLength=100, minLength=1, displayName='Search Path', allowedValues=ListBuffer()}