Fixed #22194 -- Added --list-tags option to check command.

Thanks Elvard for the patch.