(1)  Where downspouts are provided and are not connected to a sewer, extensions shall be provided to carry rainwater away from the building in a manner that will prevent soil erosion.

Article Ontario Regulation 332/12 Building Code,   Information published by for educational purposes only.

The most common option for downspout extensions are flex pipes. These are very easy to maneuver and to shape the form you want.

The goal with these is to redirect the water away from your foundation.