Here curvature is defined properly:
https://en.wikipedia.org/wiki/Riemann_curvature_tensor
The curvature tensor measures noncommutativity of the covariant derivative, and as such is the integrability obstruction for the existence of an isometry with Euclidean space (called, in this context, flat space).