Recent Leica cameras have a feature called “perspective control” which automatically straightens and adjusts pictures for perspective based on the camera’s orientation sensors.
The camera only applies perspectove coorection to JPEGs, but the RAW files do include metadata which allows for RAW editing software to also apply the same correction to RAW files automatically. For exemple Lightroom leverages the metadata to apply perspective corrections to Leica RAW files: https://helpx.adobe.com/ie/camera-raw/using/leica-perspective-control.html
Since Darkroom seems to have a partnership with Leica (recent mutual integration with each other’s Apps), I think it would be a good idea to implement the feature (as a Leica user, I was pleased to see the integration between Leica Fotos and Darkroom, but the lack of support for this feature is one of the things which are holding me back).