Trim trailing spaces

2022-11-09 git

For VSCode:

You can activate the feature in Settings.

trim-trailing-spaces

For Xcode project:

sed command can do the task.

Dir.glob("**/*.swift").sort.each do |f|
  puts f
  system("sed -i '' 's/[ ]*$//' #{f}")
end