package-validator icon indicating copy to clipboard operation
package-validator copied to clipboard

URL validation within Description and ReleaseNotes is breaking on example URLs

Open flcdrg opened this issue 6 years ago • 2 comments

The new URL validation is a little too strict for description and releaseNotes fields.

For example, https://chocolatey.org/packages/azure-pipelines-agent/2.163.1 now fails, presumably because 'example' URLs are used in the description.

I'd recommend that for description and releaseNotes, adopt the following approach:

  • Ignore any URLs that are inside code blocks
  • Ignore any URLs that are not within a MarkDown hyperlink
  • For any remaining URLs that are found to be invalid, just raise a warning (instead of a failing error) and display the actual URL in question (to help package maintainers figure out if there's a real problem they can fix or not)

For releaseNotes, while this element can contain any text, some packages do just put a single URL as the content. In that specific case, I think it would be reasonable to apply the strict failing validation to the URL, but for all other content in releaseNotes then apply the same rules above as for description

flcdrg avatar Dec 25 '19 08:12 flcdrg

This issue is related to this one:

https://github.com/chocolatey/package-validator/issues/207

Switching Description and Release Notes to guidelines is in line with what this issue was created for.

gep13 avatar Jan 06 '20 10:01 gep13

@flcdrg I think that there is still work to be done on this issue to account for everything, but the package that you specifically mention in the issue has now successfully passed validation.

gep13 avatar Jan 06 '20 11:01 gep13