“You shall not hate your brother in your heart, you shall surely rebuke your fellow man and not allow sin over him.”
When a person feels the necessity to rebuke his neighbor, there are certain factors that he needs to take into consideration. Rabbenu the Hida quoting Maharash Ozida, says that one