private void checkBasicStructure() {
    check("contains name attribute", () -> mbtiles.metadata().toMap().containsKey("name"));
    check("contains at least one tile", () -> mbtiles.getAllTileCoords().stream().findAny().isPresent());
    checkWithMessage("all tiles are valid", () -> {
      List<String> invalidTiles = mbtiles.getAllTileCoords().stream()
        .flatMap(coord -> checkValidity(coord, decode(mbtiles.getTile(coord))).stream())
        .toList();
      return invalidTiles.isEmpty() ? Optional.empty() :
        Optional.of(invalidTiles.size() + " invalid tiles: " + invalidTiles.stream().limit(5).toList());
    });
  }
Exits with a nonzero exit code if there were any failures.
planetiler-core/src/main/java/com/onthegomap/planetiler/mbtiles/Verify.java