I'm interested in writing scripts that autocorrect specific files, but it seems that autocorrect in its current form doesn't accept any arguments. Is this capability somewhere else, or is just not supported at this time?
You can specify a path to autocorrect to just correct that path:
$ swiftlint help autocorrect
Automatically correct warnings and errors
[--path (string)]
the path to the file or directory to correct
[--config .swiftlint.yml]
the path to SwiftLint's configuration file
[--use-script-input-files]
read SCRIPT_INPUT_FILE* environment variables as files
e.g.
$ swiftlint autocorrect --path just_this_file.swift
Most helpful comment
You can specify a path to
autocorrectto just correct that path:e.g.