A code enforcement officer can come knock on your door and ask to look around either inside or outside but without the warrant they must have your permission to look around on your property.
A code enforcement officer can take pictures and look around your property from the street or other public property but to step onto your property or go into your house without your permission they must get a warrant signed by the judge.
You can make code enforcement leave your property by contacting the police if they don't leave as I've done it before.