We signed a lease to rent never moved in since then the house failed county code can we break a lease?Also does landlord have to give a notice to enter the property?
The answers to these questions are going to be based on information that is not available to us. First, you have signed a lease that sets forth the rights and responsibilities of landlord and tenant, and you will need to read the lease carefully to see if it includes a warranty of habitability for use as a residential dwelling. Second, your state is likely to have a statute or case law that provides a warranty of habitability, even if the lease does not. In Pennsylvania, for example, there is case law that says landlords must provide rental property that is suitable for everyday living, and it does not matter what the lease says. Third, failing the county code is not necessarily evidence of uninhabitability since there might be trivial violations that would not really affect your ability to live safely and comfortably in the property. Without knowing what the defects are, it is hard to comment.
You might want to use "landlord and tenant law" plus the name of your state as a search term in Google or another search engine to have a look at your state's law. I believe most states have them on-line now. But my best advice here is to consult with an attorney before making any decision at all. Quite often, local bar associations will provide a list of attorneys who are willing to give you an initial consultation for a reduced fee. If you decide to not move in without specific legal advice based on a readiing of the lease and a knowledge of the laws of your state, you could find yourself in court being sued for the entire lease, not a desirable outcome.