Closed ChristopherJHart closed 1 month ago
Agreed. Potentially we should enhance OrderSettingsSecrion with this functionality.
I've checked the code and I see the feature I have forgotten about in https://robotidy.readthedocs.io/en/stable/transformers/OrderSettingsSection.html . Theoretically if you configure OrderSettingsSection with imports_order it should also order built-ins (place them on top and sort alphabetically). Can you confirm it works for you? @ChristopherJHart
@bhirsz Oh very nice, I didn't know there was a transformer that did this already! I tested it and can confirm it worked (and just saved us a ton of work). Thank you so much!
We have a large Robot Framework codebase that has a lot of violations against Robocop's builtin-imports-not-sorted rule that was added early last June. It would be really nice if there was a transformer that automatically sorted built-in imports to enforce compliance with this rule.