Open code cleanup settings in VS by going to Analyze=>Code Cleanup=>Configure Code Cleanup..
Include fixer Fix analyzer warnings and errors set in EditorConfig
Now run on a file using the broom icon or use key combination Ctrl+K, Ctrl+E (on windows)