If the City has issued an order related to the property, your lawyer will see it during the title search that happens before closing, since outstanding municipal charges can attach to the property and affect the sale. That is a different process than a sidewalk violation program and it runs through the closing lawyer, not a pre-listing inspection.
A cracked or heaved sidewalk without any City order attached is a presentation and safety issue rather than a legal one, and a buyer's home inspection, typically $400 to $600, will likely flag it regardless. Fixing an obvious hazard before listing is good practice even without a compliance requirement behind it.
Ask your lawyer to check for any outstanding municipal orders as part of the sale. Get your hand-reviewed valuation from Joel Dyck.