Specifying --lint in .swiftformat results in "Unknown option --lint"
It's a bit dangerous that the default is to format files, so I wanted to put --lint in .swiftformat. But it doesn’t like that:
$ swiftformat .
Running SwiftFormat...
Reading config file at /…/.swiftformat
error: Unknown option --lint. Did you mean --lintonly? in configuration file.
@JetForMe --lint is not a formatting option but a mode, so you can't set it in the config. I'll see if I can find a better solution.
Oh, I had figured the file was just a way of specifying any and all options you might specify on the command line.
@JetForMe not sure if this entirely solves your problem, but adding --lintonly all to your .swiftformat file will prevent swiftformat from doing anything unless it's run in --lint mode (you'll still need to actually add --lint to the command when running it if you want it to lint the files).