opam-repo-ci
opam-repo-ci copied to clipboard
Check all URLs in opam file to ensure they are live
As per https://github.com/ocaml/opam-repository/wiki/PR-checks#for-any-additions, one of the manual checks opam repo maintainers currently are meant to perform is validating that URLs (e.g., to the project homepage) are valid. This is not really feasible in practice, due to the tedious and easily forgotten nature of this check. But this should be easy to automate,
For any field that should hold a a URL to a resource accessible via HTTP as its primary value, we can make a request to ensure it returns an OK status. As pre https://opam.ocaml.org/doc/Manual.html#url, the fields in questions (at least for a start) should be
homepagebug-reportsdev-repo
We should not need to check the url field (or file), since this is tested already when trying to build the source during the build/test steps. However, we could lint this if we wanted to get an earlier failure.