Many rain downspouts end right next the the foundation of a building, which makes no sense to me. You want to get that water as far away from the foundation as possible. A client who was getting water in their basement called Handyman Eric, The Park Slope Handyman.
Here we have dug a trench and installed corrugated drain pipe to move the rainwater away from the building. This pipe works well for this project, its flexible and can be buried. The photo below shows the work in progress, we attached more pipe here to move the water about 25′ from the building.

