Skip to content

Commit

Permalink
Merge pull request #1679 from marcelofabri/parallel-autocorrect
Browse files Browse the repository at this point in the history
Parallel autocorrect
  • Loading branch information
marcelofabri authored Jul 17, 2017
2 parents 7e34f98 + 4dcbc5e commit 9edde88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
[Cody Winton](https://github.com/codytwinton)
[#1327](https://github.com/realm/SwiftLint/issues/1327)

* Improve `autocorrect` performance by running it in parallel.
[Marcelo Fabri](https://github.com/marcelofabri)
[#1578](https://github.com/realm/SwiftLint/issues/1578)

##### Bug Fixes

* Fix false positive on `redundant_discardable_let` rule when using
Expand Down
5 changes: 3 additions & 2 deletions Source/swiftlint/Commands/AutoCorrectCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ struct AutoCorrectCommand: CommandProtocol {
let cache = options.ignoreCache ? nil : LinterCache(configuration: configuration)

return configuration.visitLintableFiles(path: options.path, action: "Correcting",
quiet: options.quiet, useScriptInputFiles: options.useScriptInputFiles,
cache: cache) { linter in
quiet: options.quiet,
useScriptInputFiles: options.useScriptInputFiles,
cache: cache, parallel: true) { linter in
let corrections = linter.correct()
if !corrections.isEmpty && !options.quiet {
let correctionLogs = corrections.map({ $0.consoleDescription })
Expand Down

0 comments on commit 9edde88

Please sign in to comment.