How to install a specific version of swiftlint?

I am trying to fix this error:

Error: swiftlint does not have a version "0.11.1" in the Cellar.

by doing this:

brew install swiftlint-0.11.1

however, this will not work, then I tried " brew search swiftlint", but nothing appeared.

Can someone tell me the correct way to install swiftlint with a specific version?

+7
source share
3 answers

Go to /usr/local/Cellar/swiftlint, you will see all installed versions of the switch.
Copy the swiftlint version folder from another Mac, then paste into/usr/local/Cellar/swiftlint

You can check all versions on your Mac by brew info swiftlint

Switch to the correct version using brew switch swiftlint x.xx.x

I downloaded some version ==> here

Update: Now you can use the pods for this.

swift2.2 SwiftLint 0.12.0, brew.

Pod. . , , ( ...).

pod 'SwiftLint', '0.16.0' . disable_rules, , .

  • type_name
  • shorthand_operator
  • unused_closure_parameter
+9

, :

Swiftlint. .

Swift Lint, History . GitHub , (git@github.com:Homebrew/homebrew-core.git), git log master -- Formula/swiftlint.rb, . .

URL . , URL - https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/swiftlint.rb, https://github.com/Homebrew/homebrew-core/blob/COMMIT/Formula/swiftlint.rb

Swift Lint. 0,15, :

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/864095ea97b6d7dc88c772c7f9f36521cf81a77e/Formula/swiftlint.rb
+5

SwiftLint . SwiftLint.pkg .

0

Source: https://habr.com/ru/post/1667832/


All Articles