Enforce manager -> datasource links for better documentation #5651
Labels
priority-3-medium
Default priority, "should be done" but isn't prioritised ahead of others
status:requirements
Full requirements are not yet known, so implementation should not be started
type:refactor
Refactoring or improving of existing code
I think users would benefit if each manager's documentation page stated which
datasource
values it supported, e.g.docker
,github-tags
, etc. Ideally this would be auto-generated from the code like we do forfileMatch
(see https://docs.renovatebot.com/modules/manager/cocoapods/ for an example).I can think of a few ways to do this, although each has a downside:
Scan each manager's files for references to
datasource/*
imports and then use that to build the list. If any manager uses literal strings though, it won't catch them. Also it's a little challenging because we don't mandate file names within a manager.Mandate that each
manager
export a list of datasources it supports, and then havedatasource/index
enforce that no returned deps have a datasource that mismatches. The problem here is (a) extra work (not too much..) and (b) we'd need to make sure that managers don't test themselves directly and instead test via the index function.I guess I'd lean towards the first approach, because it should be correctly nearly all of the time but also there's not really a huge problem if documentation is temporarily wrong until someone spots it.
The text was updated successfully, but these errors were encountered: