ansible-lint
ansible-lint copied to clipboard
Add version check similar to pip
In order to avoid getting bug reports for old versions of the linter, add a version check that adds a warning at the end of the execution when an older version is used.
Reference: https://github.com/pypa/pip/blob/25114e1f9ed4c5fa2b0407a26266080a5ff1cb2c/src/pip/_internal/self_outdated_check.py#L178
pip implementation checks by default only once a week and caches the result, a decent tradeoff. If anyone wants to implement this feature, please add a comment here when you start working on it.
Potential libraries that can help implementing this feature:
- https://pypi.org/project/outdated/ which has few downsides:
- only one maintainer and hosted under private github repo (single point of failure risks)
- adds two dependencies, itself and https://pypi.org/project/littleutils/ which is not really a mainstream package
- not popular, no known package using it
- pip own version checks code may be copied, at least we could avoid adding more dependencies
Still looking for more popular solutions as I do not want to transform this feature into a liability