I am trying to fix this error:
Error: swiftlint does not have a version "0.11.1" in the Cellar.
by running this:
brew install swiftlint-0.11.1
however this doesn't work, then I tried "brew search swiftlint
", but nothing showed up.
Can anyone point to me the correct way to install swiftlint with a specific version?
Go to /usr/local/Cellar/swiftlint you will see all installed switflint version.
To save you some time, here's how to do it: You create a local “tap” - which I assume is something like a local brew repository. You extract the desired version of the package into this local tap. You install your local tap.
You can easily install SwiftLint using Homebrew: $ brew install swiftlint . If you have already installed SwiftLint, you can update it to the latest version using the $ brew upgrade swiftlint command. NOTE: Please update Homebrew to the latest version before installing and updating SwiftLint: $ brew update .
Go to /usr/local/Cellar/swiftlint
you will see all installed switflint version.
Copy swiftlint version folder from other Mac then paste into /usr/local/Cellar/swiftlint
You could check all versions in your Mac by brew info swiftlint
Switch to version you need by brew switch swiftlint x.xx.x
I uploaded some version ==> here
Update: Now you could use pods for this.
My project is using swift2.2 with SwiftLint 0.12.0 installed via brew.
And I decided to change to Pod. There are many changes and errors in each versions. My project is too big, and it's take time to fix all the error and warning (it may effect to current features also...).
Finally I choose pod 'SwiftLint', '0.16.0'
and. disable_rules then I don't need to fix any warning nor error.
Just go to Swiftlint release page and select the appropriate version.
Download it and extract it.
You should be able to see an executable and a licence txt file.
Now go to /usr/local/Cellar/swiftlint
and create a folder with the version (for ex. 0.35.0).
Create a bin
folder inside it and paste the swiftlint executable that you have downloaded.
Brew now shows the custom version that you have downloaded . You can check by typing brew info swiftlint
in cmd
you can switch by brew switch swiftlint version_number
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With