Can you sell your house with a violation
It is highly unlikely that you will be able to sell a house that has a violation. In most cases, the lender won't approve the loan and it is possible that the city will not allow the house to have a clear title until all is resolved.
depends what kind of violation
What kind of violation?