As the Rambam wrote, it is not proper to distance those who desecrate Shabbat, but to draw them close and receive them in the synagogue. The Gemara in Eruvin set out that one who covered the bundle when he saw Yehudah Nesia is considered as desecrating in private. If he desecrated before ten, it is public, unless he was embarrassed.