vhbit / swift-linter

Swift Linter for Phabricator
BSD 3-Clause "New" or "Revised" License
12 stars 8 forks source link

Add support for autocorrection #2

Open jverkoey opened 8 years ago

jverkoey commented 8 years ago

https://github.com/realm/swiftlint

From the docs:

SwiftLint can automatically correct certain violations. Files on disk are overwritten with a corrected version.

Please make sure to have backups of these files before running swiftlint autocorrect, otherwise important data may be lost.

Like https://github.com/vhbit/clang-format-linter, we can probably provide auto-corrected results to arc.

vhbit commented 8 years ago

@jverkoey I'll take a look into it (more likely in the weekend). The main reason why it wasn't implemented earlier is that autocorrection is very basic, like stripping whitespaces - functionality which is provided by almost any editor.

jverkoey commented 8 years ago

Makes sense :) I'm not certain about the extent of autocorrection now.