Recently when I was studying about Sharia punishment for homosexuality I came to know from few Muslims (like Tariq Ramadan, Hamza Yusuf) Sharia doesn't punish you for what you do in the privacy of your home unless you are compromising the security of the state.
I was really fascinated by this balanced viewpoint. But it may happen few people are disclosing other Muslim's sin (which doesn't have any need to be disclosed by just spying on them and complaining about them to the state and also providing witnesses).
In that scenario is there any punishment in sharia for spying unnecessarily?