swift-format seems to be printing out every single file to the console, and Xcode interprets any line starting with error: as an error. That’s kind of funny and unfortunate.
What is the contents of your script phase for running swift format?
Xcode interprets any line starting with error: as an error.
Same thoughts.
if which swift-format >/dev/null; then
swift-format format -r ${PROJECT_DIR} --configuration .swift-format.json
swift-format lint -r ${PROJECT_DIR} --configuration .swift-format.json
else
echo "warning: swift-format not installed"
fi
Make sure that you use the -i or --in-place flag on the format command to write the output back to the original file, otherwise it gets written to standard output.