In this paper, we present a novel sensor-based system to perform defect inspection tasks automatically over free-form specular surfaces. The inspection procedure is performed by a robotic manipulator equipped with a line scanner system. Taking the geometric and optical parameters into consideration, our algorithm computes a flexible scanning path. Based on a mesh model, the system segments the convex surface into areas with similar curvatures, then adaptively adjusts the line sensor's scanning range to ensure the complete coverage of the surface. We consider the scanning efficiency through constrained optimization. To align the computed scanning path with the specular object, a real-time workpiece localization algorithm in a coarse-to-fine manner is developed. Our control framework synchronizes the motion of the manipulator and the acquisition of the line scanner for robotic inspection. We also provide an image processing pipeline for automatic defect detection. To validate the proposed formal methodology, we report a detailed experimental study with the developed robotic inspection prototype.