mirror of
https://github.com/ypresto/SwiftLintXcode.git
synced 2026-04-24 14:27:41 +00:00
ypresto/SwiftLintXcode#11 always call autocorrect with --format option.
This commit is contained in:
parent
ef0d9f356f
commit
d93c5ec3a1
2 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ SwiftLintXcode
|
||||||
|
|
||||||
An Xcode plug-in to format your code using [SwiftLint](https://github.com/realm/SwiftLint).
|
An Xcode plug-in to format your code using [SwiftLint](https://github.com/realm/SwiftLint).
|
||||||
|
|
||||||
Runs `swiftlint autocorrect --path CURRENT_FILE` before \*.swift file is saved.
|
Runs `swiftlint autocorrect --format --path CURRENT_FILE` before \*.swift file is saved.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ final class Formatter {
|
||||||
let swiftlintPath = try self.getExecutableOnPath(name: "swiftlint", workingDirectory: workspaceRootDirectory)
|
let swiftlintPath = try self.getExecutableOnPath(name: "swiftlint", workingDirectory: workspaceRootDirectory)
|
||||||
let task = NSTask()
|
let task = NSTask()
|
||||||
task.launchPath = swiftlintPath
|
task.launchPath = swiftlintPath
|
||||||
task.arguments = ["autocorrect", "--path", filePath]
|
task.arguments = ["autocorrect", "--format", "--path", filePath]
|
||||||
task.currentDirectoryPath = workspaceRootDirectory
|
task.currentDirectoryPath = workspaceRootDirectory
|
||||||
task.launch()
|
task.launch()
|
||||||
task.waitUntilExit()
|
task.waitUntilExit()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue